mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
testsuite: new tests.
This commit is contained in:
parent
7648a3c0b2
commit
70052b8b68
5
testsuite/tests-to-run/parallel-local17.sh
Executable file
5
testsuite/tests-to-run/parallel-local17.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '### Test --env all chars except \n,\92,\160 - single and double --onall - no output is good'
|
||||||
|
# 92 and 160 are special for csh
|
||||||
|
perl -e 'for(1..9,9,11..91,91,93..159,159,161..255) { printf "%c%c %c%d\0",$_,$_,$_,$_ }' | stdout parallel --nice 10 -j4 -k -I // --arg-sep _ -0 V=// V2=V2=// parallel -k -j1 -S :,1/lo,1/tcsh@lo,1/csh@lo --onall --env V,V2 echo \''"{}$V$V2"'\' ::: {#} | uniq -c | grep -v ' 4 '|grep -v xauth |grep -v X11
|
48
testsuite/tests-to-run/parallel-local18.sh
Normal file
48
testsuite/tests-to-run/parallel-local18.sh
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '### Test --env - https://savannah.gnu.org/bugs/?37351'
|
||||||
|
export TWOSPACES=' 2 spaces '
|
||||||
|
export THREESPACES=" > My brother's 12\" records < "
|
||||||
|
echo a"$TWOSPACES"b 1
|
||||||
|
parallel --env TWOSPACES echo 'a"$TWOSPACES"b' ::: 1
|
||||||
|
parallel -S localhost --env TWOSPACES echo 'a"$TWOSPACES"b' ::: 1
|
||||||
|
parallel -S csh@localhost --env TWOSPACES echo 'a"$TWOSPACES"b' ::: 1
|
||||||
|
parallel -S tcsh@localhost --env TWOSPACES echo 'a"$TWOSPACES"b' ::: 1
|
||||||
|
|
||||||
|
echo a"$TWOSPACES"b a"$THREESPACES"b 2
|
||||||
|
parallel --env TWOSPACES --env THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 2
|
||||||
|
parallel -S localhost --env TWOSPACES --env THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 2
|
||||||
|
parallel -S csh@localhost --env TWOSPACES --env THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 2
|
||||||
|
parallel -S tcsh@localhost --env TWOSPACES --env THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 2
|
||||||
|
|
||||||
|
echo a"$TWOSPACES"b a"$THREESPACES"b 3
|
||||||
|
parallel --env TWOSPACES,THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 3
|
||||||
|
parallel -S localhost --env TWOSPACES,THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 3
|
||||||
|
parallel -S csh@localhost --env TWOSPACES,THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 3
|
||||||
|
parallel -S tcsh@localhost --env TWOSPACES,THREESPACES echo 'a"$TWOSPACES"b' 'a"$THREESPACES"b' ::: 3
|
||||||
|
|
||||||
|
export MIN=" \'\""
|
||||||
|
echo a"$MIN"b 4
|
||||||
|
parallel --env MIN echo 'a"$MIN"b' ::: 4
|
||||||
|
parallel -S localhost --env MIN echo 'a"$MIN"b' ::: 4
|
||||||
|
parallel -S csh@localhost --env MIN echo 'a"$MIN"b' ::: 4
|
||||||
|
parallel -S tcsh@localhost --env MIN echo 'a"$MIN"b' ::: 4
|
||||||
|
|
||||||
|
export SPC="'"' * ? >o <i*? ][\!#¤%=( ) | }'
|
||||||
|
echo a"$SPC"b 5
|
||||||
|
parallel --env SPC echo 'a"$SPC"b' ::: 5
|
||||||
|
parallel -S localhost --env SPC echo 'a"$SPC"b' ::: 5
|
||||||
|
parallel -S csh@localhost --env SPC echo 'a"$SPC"b' ::: 5
|
||||||
|
parallel -S tcsh@localhost --env SPC echo 'a"$SPC"b' ::: 5
|
||||||
|
|
||||||
|
echo '### Test --env for \n and \\ - single and double - no output is good'
|
||||||
|
perl -e 'for(10,92) { printf "%c%c %c%d\0",$_,$_,$_,$_ }' | stdout parallel --nice 19 -j4 -k -I // --arg-sep _ -0 V=// V2=V2=// parallel -k -j1 -S :,1/lo,1/tcsh@lo,1/csh@lo --env V,V2 echo \''"{}$V$V2"'\' ::: {#} {#} {#} {#} | uniq -c | grep -v ' 4 '|grep -v xauth |grep -v X11
|
||||||
|
|
||||||
|
echo '### Test --env for \n and \\ - single and double --onall - no output is good'
|
||||||
|
perl -e 'for(10,92) { printf "%c%c %c%d\0",$_,$_,$_,$_ }' | stdout parallel --nice 19 -j4 -k -I // --arg-sep _ -0 V=// V2=V2=// parallel -k -j1 -S :,1/lo,1/tcsh@lo,1/csh@lo --onall --env V,V2 echo \''"{}$V$V2"'\' ::: {#} | uniq -c | grep -v ' 4 '|grep -v xauth |grep -v X11
|
||||||
|
|
||||||
|
echo '### Test --env for \160 - which kills csh - single and double - no output is good'
|
||||||
|
perl -e 'for(160) { printf "%c%c %c%d\0",$_,$_,$_,$_ }' | stdout parallel --nice 19 -j4 -k -I // --arg-sep _ -0 V=// V2=V2=// parallel -k -j1 -S :,1/lo,1/tcsh@lo --env V,V2 echo \''"{}$V$V2"'\' ::: {#} {#} {#} | uniq -c | grep -v ' 3 '|grep -v xauth |grep -v X11
|
||||||
|
|
||||||
|
echo '### Test --env for \160 - which kills csh - single and double --onall - no output is good'
|
||||||
|
perl -e 'for(160) { printf "%c%c %c%d\0",$_,$_,$_,$_ }' | stdout parallel --nice 19 -j4 -k -I // --arg-sep _ -0 V=// V2=V2=// parallel -k -j1 -S :,1/lo,1/tcsh@lo --onall --env V,V2 echo \''"{}$V$V2"'\' ::: {#} | uniq -c | grep -v ' 3 '|grep -v xauth |grep -v X11
|
9
testsuite/tests-to-run/sem02.sh
Normal file
9
testsuite/tests-to-run/sem02.sh
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '### Test id = --id `tty`'
|
||||||
|
parallel --id `tty` -u --semaphore seq 1 10 '|' pv -qL 20
|
||||||
|
echo '### Test default id = --id `tty`'
|
||||||
|
parallel -u --semaphore seq 11 20 '|' pv -qL 100
|
||||||
|
echo '### Test --semaphorename `tty`'
|
||||||
|
parallel --semaphorename `tty` --semaphore --wait
|
||||||
|
echo done
|
1
testsuite/wanted-results/parallel-local16
Normal file
1
testsuite/wanted-results/parallel-local16
Normal file
|
@ -0,0 +1 @@
|
||||||
|
### Test --env all chars except \n,\92,\160 - single and double - no output is good
|
1
testsuite/wanted-results/parallel-local17
Normal file
1
testsuite/wanted-results/parallel-local17
Normal file
|
@ -0,0 +1 @@
|
||||||
|
### Test --env all chars except \n,\92,\160 - single and double --onall - no output is good
|
42
testsuite/wanted-results/parallel-local18
Normal file
42
testsuite/wanted-results/parallel-local18
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
### Test --env - https://savannah.gnu.org/bugs/?37351
|
||||||
|
a 2 spaces b 1
|
||||||
|
a 2 spaces b 1
|
||||||
|
a 2 spaces b 1
|
||||||
|
a 2 spaces b 1
|
||||||
|
a 2 spaces b 1
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 2
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 2
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 2
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 2
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 2
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 3
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 3
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 3
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 3
|
||||||
|
a 2 spaces b a > My brother's 12" records < b 3
|
||||||
|
a \'"b 4
|
||||||
|
a \'"b 4
|
||||||
|
a \'"b 4
|
||||||
|
a \'"b 4
|
||||||
|
a \'"b 4
|
||||||
|
a' * ? >o <i*? ][\!#¤%=( ) | }b 5
|
||||||
|
a' * ? >o <i*? ][\!#¤%=( ) | }b 5
|
||||||
|
a' * ? >o <i*? ][\!#¤%=( ) | }b 5
|
||||||
|
a' * ? >o <i*? ][\!#¤%=( ) | }b 5
|
||||||
|
a' * ? >o <i*? ][\!#¤%=( ) | }b 5
|
||||||
|
### Test --env for \n and \\ - single and double - no output is good
|
||||||
|
2 setenv: Too many arguments.
|
||||||
|
1 export: Command not found.
|
||||||
|
1 V: Undefined variable.
|
||||||
|
2 1 10V2= 10
|
||||||
|
3 2\\ \92V2=\\ \92
|
||||||
|
1 2\ \92V2=\ \92
|
||||||
|
### Test --env for \n and \\ - single and double --onall - no output is good
|
||||||
|
2 setenv: Too many arguments.
|
||||||
|
1 export: Command not found.
|
||||||
|
1 V: Undefined variable.
|
||||||
|
2 1 10V2= 10
|
||||||
|
3 2\\ \92V2=\\ \92
|
||||||
|
1 2\ \92V2=\ \92
|
||||||
|
### Test --env for \160 - which kills csh - single and double - no output is good
|
||||||
|
### Test --env for \160 - which kills csh - single and double --onall - no output is good
|
24
testsuite/wanted-results/sem02
Normal file
24
testsuite/wanted-results/sem02
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
### Test id = --id `tty`
|
||||||
|
### Test default id = --id `tty`
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
### Test --semaphorename `tty`
|
||||||
|
11
|
||||||
|
12
|
||||||
|
13
|
||||||
|
14
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
19
|
||||||
|
20
|
||||||
|
done
|
Loading…
Reference in a new issue