Lines Matching +full:non +full:- +full:empty
37 "one-arg::0:one-arg" \
38 "one-arg:1:0:one-arg" \
39 "one-arg:0:1 one-arg" \
51 IFS=:; set -- $a
59 not="${not} -o not-match:$b"
62 atf_check -s exit:0 -o "match:${res}" ${not} -e empty \
63 ${TEST_SH} -c "set -- ${init}; shift $n;"' echo "$# $*"'
66 atf_check -s exit:0 -o match:complete -o not-match:ERR -e empty \
67 ${TEST_SH} -c \
68 'set -- a b c d e;while [ $# -gt 0 ];do shift||echo ERR;done;echo complete'
85 # a syntax error and a non-interactive shell may exit; if the shell does not
86 # exit in this case, a non-zero exit status shall be returned.
89 # NetBSD's sh treats it as an error and exits (if non-interactive, as here),
92 # Either behaviour is acceptable - so the test allows for both
97 "one-arg:2" \
98 "one-arg:4" \
99 "one-arg:13" \
109 IFS=:; set -- $a
112 atf_check -s not-exit:0 -o match:OK -o not-match:ERR \
113 -e ignore ${TEST_SH} -c \
114 "set -- $1 ;"'echo OK:$#-'"$2;shift $2 && echo ERR"
128 atf_set "descr" "Test that non-numeric args to shift are detected"
137 # will simply be ignored - we test for this by giving an "octal" value that
142 # Also no signed values (no + or -) and not a string that looks kind of like
152 for a in a I 0x12 010 5V -1 ' ' '' +1 ' 1'
154 atf_check -s not-exit:0 -o empty -e ignore ${TEST_SH} -c \
155 "set -- a b c d e f g h i; shift '$a' && echo ERROR"
164 # This is a syntax error, a non-interactive shell (us) must exit $? != 0
168 for a in "1 1" "1 0" "1 2 3" "1 foo" "1 --" "-- 1"
170 atf_check -s not-exit:0 -o empty -e not-empty ${TEST_SH} -c \
171 " set -- a b c d; shift ${a} ; echo FAILED "