diff options
author | June McEnroe <june@causal.agency> | 2019-01-10 20:19:51 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-01-10 20:19:51 -0500 |
commit | 9beeb46022fc1e0c6bc6bec029bb949df10a2c3d (patch) | |
tree | 7db75dd126879bea3f0d8762b2619e0bebcf2836 /bin/cash/tests/builtins/trap2.0 | |
parent | Remove funcs (diff) | |
download | src-9beeb46022fc1e0c6bc6bec029bb949df10a2c3d.tar.gz src-9beeb46022fc1e0c6bc6bec029bb949df10a2c3d.zip |
Remove cash/tests
Diffstat (limited to '')
-rw-r--r-- | bin/cash/tests/builtins/trap2.0 | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/bin/cash/tests/builtins/trap2.0 b/bin/cash/tests/builtins/trap2.0 deleted file mode 100644 index 020dcfd9..00000000 --- a/bin/cash/tests/builtins/trap2.0 +++ /dev/null @@ -1,52 +0,0 @@ -# $FreeBSD: releng/12.0/bin/sh/tests/builtins/trap2.0 194517 2009-06-19 22:15:59Z jilles $ -# This is really a test for outqstr(), which is readily accessible via trap. - -runtest() -{ - teststring=$1 - trap -- "$teststring" USR1 - traps=$(trap) - if [ "$teststring" != "-" ] && [ -z "$traps" ]; then - # One possible reading of POSIX requires the above to return an - # empty string because backquote commands are executed in a - # subshell and subshells shall reset traps. However, an example - # in the normative description of the trap builtin shows the - # same usage as here, it is useful and our /bin/sh allows it. - echo '$(trap) is broken' - exit 1 - fi - trap - USR1 - eval "$traps" - traps2=$(trap) - if [ "$traps" != "$traps2" ]; then - echo "Mismatch for '$teststring'" - exit 1 - fi -} - -runtest 'echo' -runtest 'echo hi' -runtest "'echo' 'hi'" -runtest '"echo" $PATH' -runtest '\echo "$PATH"' -runtest ' 0' -runtest '0 ' -runtest ' 1' -runtest '1 ' -i=1 -while [ $i -le 127 ]; do - c=$(printf \\"$(printf %o $i)") - if [ $i -lt 48 ] || [ $i -gt 57 ]; then - runtest "$c" - fi - runtest " $c$c" - runtest "a$c" - i=$((i+1)) -done -IFS=, -runtest ' ' -runtest ',' -unset IFS -runtest ' ' - -exit 0 |