about summary refs log tree commit diff
path: root/posix/wordexp-test.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-12 23:45:52 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-12 23:45:52 +0000
commitb2900a1342fb5bdff2420b9aff4d2f6c7e3d3ad6 (patch)
treece938a50eccde5e98dc12fcc83176d9c654902db /posix/wordexp-test.c
parent2799531132f564a4681d7fd8c3b4c71a474d86a1 (diff)
downloadglibc-b2900a1342fb5bdff2420b9aff4d2f6c7e3d3ad6.tar.gz
glibc-b2900a1342fb5bdff2420b9aff4d2f6c7e3d3ad6.tar.xz
glibc-b2900a1342fb5bdff2420b9aff4d2f6c7e3d3ad6.zip
Update.
1999-04-12  Tim Waugh  <tim@cyberelk.demon.co.uk>

	* posix/wordexp-test.c: In field-splitting test cases where
	subshells were involved, unset IFS first: some shells (ash) use
	IFS even when no expansion is performed.
Diffstat (limited to 'posix/wordexp-test.c')
-rw-r--r--posix/wordexp-test.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
index 21bca96681..8720389d4b 100644
--- a/posix/wordexp-test.c
+++ b/posix/wordexp-test.c
@@ -56,19 +56,26 @@ struct test_case_struct
      * but does NOT start a new field. */
     { 0, ":abc:", "$var", 0, 2, { "", "abc", }, ":" },
 
-    { 0, NULL, "$(echo :abc:)", 0, 2, { "", "abc", }, ":" },
-    { 0, NULL, "$(echo :abc:\\ )", 0, 2, { "", "abc", }, ": " },
-    { 0, NULL, "$(echo :abc\\ )", 0, 2, { "", "abc", }, ": " },
-    { 0, ":abc:", "$(echo $var)", 0, 2, { "", "abc", }, ":" },
+    { 0, NULL, "$(unset IFS;echo :abc:)", 0, 2, { "", "abc", }, ":" },
+    { 0, NULL, "$(unset IFS;echo :abc:\\ )", 0, 2, { "", "abc", }, ": " },
+    { 0, NULL, "$(unset IFS;echo :abc\\ )", 0, 2, { "", "abc", }, ": " },
+    { 0, ":abc:", "$(unset IFS;echo $var)", 0, 2, { "", "abc", }, ":" },
     { 0, NULL, ":abc:", 0, 1, { ":abc:", }, ":" },
-    { 0, NULL, "$(echo :abc:)def", 0, 3, { "", "abc", "def", }, ":" },
-    { 0, NULL, "$(echo abc:de)f", 0, 2, { "abc", "def", }, ":" },
-    { 0, NULL, "$(echo abc:de)f:ghi", 0, 2, { "abc", "def:ghi", }, ":" },
-    { 0, NULL, "abc:d$(echo ef:ghi)", 0, 2, { "abc:def", "ghi", }, ":" },
-    { 0, "abc:", "$var$(echo def:ghi)", 0, 3, { "abc", "def", "ghi", }, ":" },
-    { 0, "abc:d", "$var$(echo ef:ghi)", 0, 3, { "abc", "def", "ghi", }, ":" },
-    { 0, "def:ghi", "$(echo abc:)$var", 0, 3, { "abc", "def", "ghi", }, ":" },
-    { 0, "ef:ghi", "$(echo abc:d)$var", 0, 3, { "abc", "def", "ghi", }, ":" },
+    { 0, NULL, "$(unset IFS;echo :abc:)def", 0, 3, { "", "abc", "def", },
+      ":" },
+    { 0, NULL, "$(unset IFS;echo abc:de)f", 0, 2, { "abc", "def", }, ":" },
+    { 0, NULL, "$(unset IFS;echo abc:de)f:ghi", 0, 2, { "abc", "def:ghi", },
+      ":" },
+    { 0, NULL, "abc:d$(unset IFS;echo ef:ghi)", 0, 2, { "abc:def", "ghi", },
+      ":" },
+    { 0, "abc:", "$var$(unset IFS;echo def:ghi)", 0, 3, { "abc", "def",
+							  "ghi", }, ":" },
+    { 0, "abc:d", "$var$(unset IFS;echo ef:ghi)", 0, 3, { "abc", "def",
+							  "ghi", }, ":" },
+    { 0, "def:ghi", "$(unset IFS;echo abc:)$var", 0, 3, { "abc", "def",
+							  "ghi", }, ":" },
+    { 0, "ef:ghi", "$(unset IFS;echo abc:d)$var", 0, 3, { "abc", "def",
+							  "ghi", }, ":" },
 
     /* Simple parameter expansion */
     { 0, "foo", "${var}", 0, 1, { "foo", }, IFS },