aboutsummaryrefslogtreecommitdiff
path: root/posix/wordexp-test.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-14 15:22:40 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-14 15:22:40 +0000
commit1ffaaca2a33e068501a14c4b635c0948cdba79e0 (patch)
tree7ec9c63900f5978c51dbbe45b56e36dc470d0ba3 /posix/wordexp-test.c
parent4ca020f54d113fca0e45cb5c5317fbe98bb04bec (diff)
downloadglibc-1ffaaca2a33e068501a14c4b635c0948cdba79e0.tar
glibc-1ffaaca2a33e068501a14c4b635c0948cdba79e0.tar.gz
glibc-1ffaaca2a33e068501a14c4b635c0948cdba79e0.tar.bz2
glibc-1ffaaca2a33e068501a14c4b635c0948cdba79e0.zip
Update.
1998-09-14 22:46 Tim Waugh <tim@cyberelk.demon.co.uk> * posix/wordexp-test.c: Chet Ramey confirmed that bash's behaviour for field-splitting :abc: is correct, and that two fields should result. Revert tests to reflect this. * posix/wordexp.c (w_emptyword): Remove function. (exec_comm): Don't use w_emptyword. (parse_param): Likewise.
Diffstat (limited to 'posix/wordexp-test.c')
-rw-r--r--posix/wordexp-test.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
index 1815241fca..be81c4babf 100644
--- a/posix/wordexp-test.c
+++ b/posix/wordexp-test.c
@@ -51,11 +51,15 @@ struct test_case_struct
{ 0, "two three", "one $var", 0, 3, { "one", "two", "three", }, IFS },
{ 0, "two three", "one \"$var\"", 0, 2, { "one", "two three", }, "" },
{ 0, "two three", "one $var", 0, 2, { "one", "two three", }, "" },
- { 0, ":abc:", "$var", 0, 3, { "", "abc", "", }, ":" },
- { 0, NULL, "$(echo :abc:)", 0, 3, { "", "abc", "", }, ":" },
- { 0, NULL, "$(echo :abc:\\ )", 0, 3, { "", "abc", "", }, ": " },
+
+ /* The non-whitespace IFS char at the end delimits the second field
+ * 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, 3, { "", "abc", "", }, ":" },
+ { 0, ":abc:", "$(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", }, ":" },