Lines Matching +full:- +full:- +full:yes
3 [ -f testing.sh ] && . testing.sh
7 testcmd "-- isn't parsed" "-- == -- && echo yes" "yes\n" "" ""
13 testcmd "1 arg isn't an operand" '-t 2>&1; echo $?' '0\n' '' ''
14 testcmd '2 args' '-e == ; echo $?' '1\n' '' ''
15 testcmd '3 args' '-e == -e ; echo $?' '0\n' '' ''
27 ln -s /dev/null L
35 "$C" $* $i && echo -n $i
39 testing "-b" "type_test -b" "" "" ""
40 testing "-c" "type_test -c" "L" "" ""
41 testing "-d" "type_test -d" "d" "" ""
42 testing "-e" "type_test -e" "dfLsp" "" ""
43 testing "-f" "type_test -f" "fs" "" ""
44 testing "-h" "type_test -h" "L" "" ""
45 testing "-L" "type_test -L" "L" "" ""
46 testing "-p" "type_test -p" "p" "" ""
47 testing "-S" "type_test -S" "" "" ""
48 testing "-s" "type_test -s" "ds" "" ""
49 testing "! -e" 'type_test ! -e' "n" "" ""
55 testcmd "-t" '-t 0 < /dev/null; echo $?' '1\n' '' ''
56 testcmd "-t2" '-t 0 < /dev/ptmx; echo $?' '0\n' '' ''
58 # test -rwx each bit position and failure
64 [ $(id -u) -eq 0 ] && [ $i == r -o $i == w ] && XX=yes # Root always has access
67 testcmd "-$i 0" "-$i walrus && echo yes || echo no" "$XX\n" "" ""
68 chmod $((7777-$MASK)) walrus
69 testcmd "-$i inverted" "-$i walrus && echo yes || echo no" "$XX\n" "" ""
77 testcmd "-${i:0:1}" "-${i:0:1} walrus && echo yes" "yes\n" "" ""
82 [ $(id -u) -eq 0 ] && XX=yes # Root always has access
86 [ $i == 100 ] && XX=yes
87 testcmd "-$j $i" "-$j walrus && echo yes || echo no" "$XX\n" "" ""
90 rm -f walrus
93 testcmd "-n" "-n '' || echo yes" "yes\n" "" ""
94 testcmd "-n2" "-n a && echo yes" "yes\n" "" ""
95 testcmd "-z" "-z '' && echo yes" "yes\n" "" ""
96 testcmd "-z2" "-z a || echo yes" "yes\n" "" ""
97 testcmd "" "a = b || echo yes" "yes\n" "" ""
98 testcmd "" "'' = '' && echo yes" "yes\n" "" ""
99 testcmd "a != b" "a != b && echo yes" "yes\n" "" ""
100 testcmd "a != b" "a != a || echo yes" "yes\n" "" ""
104 $C -1 $1 1 && echo -n l
105 $C 0 $1 0 && echo -n e
106 $C -3 $1 -5 && echo -n g
109 testing "-eq" "arith_test -eq" "e" "" ""
110 testing "-ne" "arith_test -ne" "lg" "" ""
111 testing "-gt" "arith_test -gt" "g" "" ""
112 testing "-ge" "arith_test -ge" "eg" "" ""
113 testing "-lt" "arith_test -lt" "l" "" ""
114 testing "-le" "arith_test -le" "le" "" ""
116 testing "positional" "test -a == -a && echo yes" "yes\n" "" ""
117 testing "! stacks" 'test \! \! \! \! 2 -eq 2 && echo yes' "yes\n" "" ""
120 testing "<1" 'test abc \< def && echo yes' "yes\n" "" ""
121 testing "<2" 'test def \< abc || echo yes' "yes\n" "" ""
122 testing ">1" 'test abc \> def || echo yes' "yes\n" "" ""
123 testing ">2" 'test def \> abc && echo yes' "yes\n" "" ""
125 toyonly testcmd "=~" 'abc =~ a.c && echo yes' "yes\n" "" ""
127 toyonly testcmd "=~ zero length match" 'abc =~ "1*" && echo yes' 'yes\n' '' ''
129 # test ! = -o a
130 # test ! \( = -o a \)
131 # test \( ! = \) -o a
135 # -e == -a
136 # -e == -a -o -d != -o
137 # \( "x" \) -a \) == \)
138 # \( ! ! ! -e \) \)
140 # // () -a (() -a () -o ()) -o ()
141 # // x -a ( x -o x ) -a x
142 # // x -o ( x -a x ) -a x -o x
145 # test \( ! ! ! -e \) \)
146 # test \( \( "" \) -a "" \) -a ""
148 # test \( \) == \) \) -a x
150 # test \( "" \) -a \) == \)
151 # test \( "x" \) -a \) == \)
152 # test -e == -a