test: Add more testcases.
The new testcases pass even on old stable/7, but some other implementations manage to get them wrong. Also remove a few duplicate testcases.
This commit is contained in:
parent
62e6ce9a4b
commit
f4f4b264b5
@ -52,7 +52,7 @@ t ()
|
||||
}
|
||||
|
||||
count=0
|
||||
echo "1..97"
|
||||
echo "1..130"
|
||||
|
||||
t 0 'b = b'
|
||||
t 0 'b == b'
|
||||
@ -138,8 +138,6 @@ t 1 '! = a'
|
||||
t 0 '! != -n'
|
||||
t 0 '! -c /etc/passwd'
|
||||
|
||||
t 0 '! \( = \)'
|
||||
t 1 '! \( != \)'
|
||||
t 1 '! = = ='
|
||||
t 0 '! = = \)'
|
||||
t 0 '! "" -o ""'
|
||||
@ -147,7 +145,6 @@ t 1 '! "x" -o ""'
|
||||
t 1 '! "" -o "x"'
|
||||
t 1 '! "x" -o "x"'
|
||||
t 0 '\( -f /etc/passwd \)'
|
||||
t 1 '\( ! = \)'
|
||||
t 0 '\( ! "" \)'
|
||||
t 1 '\( ! -e \)'
|
||||
|
||||
@ -160,3 +157,40 @@ t 1 '-z y -o y = "#" -o y = x'
|
||||
t 0 '0 -ne 0 -o ! -f /'
|
||||
t 0 '1 -ne 0 -o ! -f /etc/passwd'
|
||||
t 1 '0 -ne 0 -o ! -f /etc/passwd'
|
||||
|
||||
t 0 '-n ='
|
||||
t 1 '-z ='
|
||||
t 1 '! ='
|
||||
t 0 '-n -eq'
|
||||
t 1 '-z -eq'
|
||||
t 1 '! -eq'
|
||||
t 0 '-n -a'
|
||||
t 1 '-z -a'
|
||||
t 1 '! -a'
|
||||
t 0 '-n -o'
|
||||
t 1 '-z -o'
|
||||
t 1 '! -o'
|
||||
t 1 '! -n ='
|
||||
t 0 '! -z ='
|
||||
t 0 '! ! ='
|
||||
t 1 '! -n -eq'
|
||||
t 0 '! -z -eq'
|
||||
t 0 '! ! -eq'
|
||||
t 1 '! -n -a'
|
||||
t 0 '! -z -a'
|
||||
t 0 '! ! -a'
|
||||
t 1 '! -n -o'
|
||||
t 0 '! -z -o'
|
||||
t 0 '! ! -o'
|
||||
t 0 '\( -n = \)'
|
||||
t 1 '\( -z = \)'
|
||||
t 1 '\( ! = \)'
|
||||
t 0 '\( -n -eq \)'
|
||||
t 1 '\( -z -eq \)'
|
||||
t 1 '\( ! -eq \)'
|
||||
t 0 '\( -n -a \)'
|
||||
t 1 '\( -z -a \)'
|
||||
t 1 '\( ! -a \)'
|
||||
t 0 '\( -n -o \)'
|
||||
t 1 '\( -z -o \)'
|
||||
t 1 '\( ! -o \)'
|
||||
|
Loading…
x
Reference in New Issue
Block a user