mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
testsuite: Better test of --tty.
This commit is contained in:
parent
0b99f96151
commit
32b6dc4ba5
|
@ -1052,7 +1052,7 @@ sub parse_options {
|
|||
|
||||
sub init_globals {
|
||||
# Defaults:
|
||||
$Global::version = 20150306;
|
||||
$Global::version = 20150307;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
|
|
@ -22,4 +22,16 @@ echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script2 /dev/null
|
|||
sleep 2
|
||||
rm /tmp/parallel-script-for-script2
|
||||
|
||||
echo "### Test stdin as tty input for 'vi'"
|
||||
echo 'NB: If this changes and the diff is printed to terminal, then'
|
||||
echo "the terminal settings may be fucked up. Use 'reset' to get back."
|
||||
cat >/tmp/parallel-script-for-script3 <<EOF
|
||||
#!/bin/bash
|
||||
seq 10 | parallel --tty -X vi file{}
|
||||
EOF
|
||||
chmod 755 /tmp/parallel-script-for-script3
|
||||
echo ZZZZ | script -q -f -c /tmp/parallel-script-for-script3 /dev/null
|
||||
sleep 2
|
||||
rm /tmp/parallel-script-for-script3
|
||||
|
||||
touch ~/.parallel/will-cite
|
||||
|
|
|
@ -14,7 +14,9 @@ Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
|||
cat -
|
||||
via first cat
|
||||
cat -
|
||||
cat -
|
||||
via pseudotty
|
||||
cat -
|
||||
### Test stdin goes to first command only ("cat" as argument)
|
||||
Academic tradition requires you to cite works you base your article on.
|
||||
When using programs that use GNU Parallel to process data for publication
|
||||
|
@ -30,5 +32,24 @@ Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
|||
|
||||
echo a
|
||||
a
|
||||
echo a
|
||||
cat
|
||||
via pseudotty
|
||||
cat
|
||||
### Test stdin as tty input for 'vi'
|
||||
NB: If this changes and the diff is printed to terminal, then
|
||||
the terminal settings may be fucked up. Use 'reset' to get back.
|
||||
Academic tradition requires you to cite works you base your article on.
|
||||
When using programs that use GNU Parallel to process data for publication
|
||||
please cite:
|
||||
|
||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||
;login: The USENIX Magazine, February 2011:42-47.
|
||||
|
||||
This helps funding further development; and it won't cost you a cent.
|
||||
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
||||
|
||||
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
||||
|
||||
10 files to edit
|
||||
[?1049h[?1h=[1;24r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[24;1H"file1" [New File][2;1H[1m[34m~ [3;1H~ [4;1H~ [5;1H~ [6;1H~ [7;1H~ [8;1H~ [9;1H~ [10;1H~ [11;1H~ [12;1H~ [13;1H~ [14;1H~ [15;1H~ [16;1H~ [17;1H~ [18;1H~ [19;1H~ [20;1H~ [21;1H~ [22;1H~ [23;1H~ [1;1H[?12l[?25h[?25l[m[24;1H[1m[37m[41mE173: 9 more files to edit[1;1H[?12l[?25h[24;1H[m[24;1H[K[24;1H[?1l>[?1049l
|
Loading…
Reference in a new issue