aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-08 03:06:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-08 03:06:04 +0200
commit4ac9819263114edb9b5b638ffa6d2e41a4bb46e7 (patch)
treef0c5bc9c7a2bf3a384b85350bfe4c9ca5ec4858f /shell/ash_test
parent5b807cd5acd1f27b3e7aa36aac2728be27c5907c (diff)
downloadbusybox-w32-4ac9819263114edb9b5b638ffa6d2e41a4bb46e7.tar.gz
busybox-w32-4ac9819263114edb9b5b638ffa6d2e41a4bb46e7.tar.bz2
busybox-w32-4ac9819263114edb9b5b638ffa6d2e41a4bb46e7.zip
apply post-1.15.1 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test')
-rw-r--r--shell/ash_test/ash-redir/redir7.right3
-rwxr-xr-xshell/ash_test/ash-redir/redir7.tests12
-rw-r--r--shell/ash_test/ash-redir/redir8.right3
-rwxr-xr-xshell/ash_test/ash-redir/redir8.tests15
-rw-r--r--shell/ash_test/ash-signals/savetrap.right8
-rwxr-xr-xshell/ash_test/ash-signals/savetrap.tests9
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 000000000..6430b0211
--- /dev/null
+++ b/shell/ash_test/ash-redir/redir7.right
@@ -0,0 +1,3 @@
1Ok
2Ok
3Done
diff --git a/shell/ash_test/ash-redir/redir7.tests b/shell/ash_test/ash-redir/redir7.tests
new file mode 100755
index 000000000..17d1040e0
--- /dev/null
+++ b/shell/ash_test/ash-redir/redir7.tests
@@ -0,0 +1,12 @@
1# Chars above 0x7f are used as special codes.
2# 0x81 is CTLESC (see ash.c).
3# The bug was that quoting and unquoting of them
4# was out of sync for redirect filenames.
5
6>unicode.sh
7echo -e 'echo Ok >uni\x81code' >>unicode.sh
8echo -e 'cat uni\x81code' >>unicode.sh
9echo -e 'cat uni?code' >>unicode.sh
10. unicode.sh
11rm uni*code*
12echo Done
diff --git a/shell/ash_test/ash-redir/redir8.right b/shell/ash_test/ash-redir/redir8.right
new file mode 100644
index 000000000..6430b0211
--- /dev/null
+++ b/shell/ash_test/ash-redir/redir8.right
@@ -0,0 +1,3 @@
1Ok
2Ok
3Done
diff --git a/shell/ash_test/ash-redir/redir8.tests b/shell/ash_test/ash-redir/redir8.tests
new file mode 100755
index 000000000..32ab607b8
--- /dev/null
+++ b/shell/ash_test/ash-redir/redir8.tests
@@ -0,0 +1,15 @@
1# Chars above 0x7f are used as special codes.
2# 0x81 is CTLESC (see ash.c).
3# The bug was that quoting and unquoting of them
4# was out of sync for redirect filenames.
5
6# Subcase when redirect filename is specified in a variable.
7
8>unicode.sh
9echo -e 'v=uni\x81code' >>unicode.sh
10echo -e 'echo Ok >"$v"' >>unicode.sh
11echo -e 'cat uni\x81code' >>unicode.sh
12echo -e 'cat uni?code' >>unicode.sh
13. unicode.sh
14rm uni*code*
15echo Done
diff --git a/shell/ash_test/ash-signals/savetrap.right b/shell/ash_test/ash-signals/savetrap.right
new file mode 100644
index 000000000..a59225be3
--- /dev/null
+++ b/shell/ash_test/ash-signals/savetrap.right
@@ -0,0 +1,8 @@
1trap -- 'echo Exiting' EXIT
2trap -- 'echo WINCH!' WINCH
3trap -- 'echo Exiting' EXIT
4trap -- 'echo WINCH!' WINCH
5trap -- 'echo Exiting' EXIT
6trap -- 'echo WINCH!' WINCH
7Done
8Exiting
diff --git a/shell/ash_test/ash-signals/savetrap.tests b/shell/ash_test/ash-signals/savetrap.tests
new file mode 100755
index 000000000..c2b312fb8
--- /dev/null
+++ b/shell/ash_test/ash-signals/savetrap.tests
@@ -0,0 +1,9 @@
1trap 'echo Exiting' EXIT
2trap 'echo WINCH!' SIGWINCH
3v=` trap `
4echo "$v"
5v=$( trap )
6echo "$v"
7v=`trap`
8echo "$v"
9echo Done