ash: add testsuite for bug 585
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 29 Aug 2009 18:37:09 +0000 (20:37 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 29 Aug 2009 18:37:09 +0000 (20:37 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/ash-redir/redir7.right [new file with mode: 0644]
shell/ash_test/ash-redir/redir7.tests [new file with mode: 0755]

diff --git a/shell/ash_test/ash-redir/redir7.right b/shell/ash_test/ash-redir/redir7.right
new file mode 100644 (file)
index 0000000..6430b02
--- /dev/null
@@ -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 (executable)
index 0000000..e9bedd0
--- /dev/null
@@ -0,0 +1,10 @@
+# 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.
+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