about summary refs log tree commit diff
path: root/posix/wordexp-test.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-24 20:51:53 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-24 20:51:53 +0000
commite9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e (patch)
tree2ba0896feb47418c5a21ed339b662ad13f568904 /posix/wordexp-test.c
parent3dd90163bb9ecb7d8b6c7a2f7d6bc746571a7ea9 (diff)
downloadglibc-e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e.tar.gz
glibc-e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e.tar.xz
glibc-e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e.zip
Update.
1998-03-25 00:00  Tim Waugh  <tim@cyberelk.demon.co.uk>

	* posix/wordexp.c (w_newword): New function.
	(do_parse_glob): New function.
	(parse_glob): Use do_parse_glob.  Now handles the case where a
	variable expansion causes a field-split.
	(wordexp): Use w_newword.
	(parse_arith): Likewise.
	(exec_comm): Likewise.
	(parse_comm): Likewise.
	(parse_param): Likewise.
	(parse_backtick): Likewise.

1998-03-24 19:36  Tim Waugh  <tim@cyberelk.demon.co.uk>

	* posix/wordexp-tst.sh: Another test.

	* posix/wordexp-test.c: Two new tests.

	* posix/wordexp.c (parse_glob): Use w_addstr instead of realloc
	directly (the code using realloc was buggy).
	(parse_param): Fix typo in comment.
Diffstat (limited to 'posix/wordexp-test.c')
-rw-r--r--posix/wordexp-test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
index 1797a7a42e..d9ecadcaa4 100644
--- a/posix/wordexp-test.c
+++ b/posix/wordexp-test.c
@@ -115,6 +115,8 @@ struct test_case_struct
     { 0, NULL, "${var=one two} \"$var\"", 0, 3, { "one", "two", "one two", } },
     { 0, "1", "$(( $(echo 3)+$var ))", 0, 1, { "4", } },
     { 0, NULL, "\"$(echo \"*\")\"", 0, 1, { "*", } },
+    { 0, "foo", "*$var*", 0, 1, { "*foo*", } },
+    { 0, "o thr", "*$var*", 0, 2, { "two", "three" } },
 
     /* Other things that should succeed */
     { 0, NULL, "\\*\"|&;<>\"\\(\\)\\{\\}", 0, 1, { "*|&;<>(){}", } },