aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-16 14:04:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-16 14:04:07 +0200
commit795633463a1f741eb965147879cfb94f6f8a8e76 (patch)
tree8641a6e32a6e1ed53f4fdaa06603f0b337cc83ab
parentddf7850f2b775c2148f76cd7e839b8a6e667de8e (diff)
downloadbusybox-w32-795633463a1f741eb965147879cfb94f6f8a8e76.tar.gz
busybox-w32-795633463a1f741eb965147879cfb94f6f8a8e76.tar.bz2
busybox-w32-795633463a1f741eb965147879cfb94f6f8a8e76.zip
add a testcase for reopened bug 585 (not fixed yet)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xshell/ash_test/ash-redir/redir7.tests4
-rw-r--r--shell/ash_test/ash-redir/redir8.right3
-rwxr-xr-xshell/ash_test/ash-redir/redir8.tests15
3 files changed, 21 insertions, 1 deletions
diff --git a/shell/ash_test/ash-redir/redir7.tests b/shell/ash_test/ash-redir/redir7.tests
index e9bedd0f4..17d1040e0 100755
--- a/shell/ash_test/ash-redir/redir7.tests
+++ b/shell/ash_test/ash-redir/redir7.tests
@@ -2,7 +2,9 @@
2# 0x81 is CTLESC (see ash.c). 2# 0x81 is CTLESC (see ash.c).
3# The bug was that quoting and unquoting of them 3# The bug was that quoting and unquoting of them
4# was out of sync for redirect filenames. 4# was out of sync for redirect filenames.
5echo -e 'echo Ok >uni\x81code' >unicode.sh 5
6>unicode.sh
7echo -e 'echo Ok >uni\x81code' >>unicode.sh
6echo -e 'cat uni\x81code' >>unicode.sh 8echo -e 'cat uni\x81code' >>unicode.sh
7echo -e 'cat uni?code' >>unicode.sh 9echo -e 'cat uni?code' >>unicode.sh
8. unicode.sh 10. unicode.sh
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