diff options
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-redir/redir7.right | 3 | ||||
-rwxr-xr-x | shell/ash_test/ash-redir/redir7.tests | 12 | ||||
-rw-r--r-- | shell/ash_test/ash-redir/redir8.right | 3 | ||||
-rwxr-xr-x | shell/ash_test/ash-redir/redir8.tests | 15 | ||||
-rw-r--r-- | shell/ash_test/ash-signals/savetrap.right | 8 | ||||
-rwxr-xr-x | shell/ash_test/ash-signals/savetrap.tests | 9 |
6 files changed, 50 insertions, 0 deletions
diff --git a/shell/ash_test/ash-redir/redir7.right b/shell/ash_test/ash-redir/redir7.right new file mode 100644 index 0000000..6430b02 --- /dev/null +++ b/shell/ash_test/ash-redir/redir7.right @@ -0,0 +1,3 @@ +Ok +Ok +Done diff --git a/shell/ash_test/ash-redir/redir7.tests b/shell/ash_test/ash-redir/redir7.tests new file mode 100755 index 0000000..17d1040 --- /dev/null +++ b/shell/ash_test/ash-redir/redir7.tests @@ -0,0 +1,12 @@ +# Chars above 0x7f are used as special codes. +# 0x81 is CTLESC (see ash.c). +# The bug was that quoting and unquoting of them +# was out of sync for redirect filenames. + +>unicode.sh +echo -e 'echo Ok >uni\x81code' >>unicode.sh +echo -e 'cat uni\x81code' >>unicode.sh +echo -e 'cat uni?code' >>unicode.sh +. unicode.sh +rm uni*code* +echo Done diff --git a/shell/ash_test/ash-redir/redir8.right b/shell/ash_test/ash-redir/redir8.right new file mode 100644 index 0000000..6430b02 --- /dev/null +++ b/shell/ash_test/ash-redir/redir8.right @@ -0,0 +1,3 @@ +Ok +Ok +Done diff --git a/shell/ash_test/ash-redir/redir8.tests b/shell/ash_test/ash-redir/redir8.tests new file mode 100755 index 0000000..32ab607 --- /dev/null +++ b/shell/ash_test/ash-redir/redir8.tests @@ -0,0 +1,15 @@ +# Chars above 0x7f are used as special codes. +# 0x81 is CTLESC (see ash.c). +# The bug was that quoting and unquoting of them +# was out of sync for redirect filenames. + +# Subcase when redirect filename is specified in a variable. + +>unicode.sh +echo -e 'v=uni\x81code' >>unicode.sh +echo -e 'echo Ok >"$v"' >>unicode.sh +echo -e 'cat uni\x81code' >>unicode.sh +echo -e 'cat uni?code' >>unicode.sh +. unicode.sh +rm uni*code* +echo Done diff --git a/shell/ash_test/ash-signals/savetrap.right b/shell/ash_test/ash-signals/savetrap.right new file mode 100644 index 0000000..a59225b --- /dev/null +++ b/shell/ash_test/ash-signals/savetrap.right @@ -0,0 +1,8 @@ +trap -- 'echo Exiting' EXIT +trap -- 'echo WINCH!' WINCH +trap -- 'echo Exiting' EXIT +trap -- 'echo WINCH!' WINCH +trap -- 'echo Exiting' EXIT +trap -- 'echo WINCH!' WINCH +Done +Exiting diff --git a/shell/ash_test/ash-signals/savetrap.tests b/shell/ash_test/ash-signals/savetrap.tests new file mode 100755 index 0000000..c2b312f --- /dev/null +++ b/shell/ash_test/ash-signals/savetrap.tests @@ -0,0 +1,9 @@ +trap 'echo Exiting' EXIT +trap 'echo WINCH!' SIGWINCH +v=` trap ` +echo "$v" +v=$( trap ) +echo "$v" +v=`trap` +echo "$v" +echo Done |