From e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Mar 1998 20:51:53 +0000 Subject: Update. 1998-03-25 00:00 Tim Waugh * 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 * 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. --- posix/wordexp-test.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'posix/wordexp-test.c') diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c index 1797a7a..d9ecadc 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, { "*|&;<>(){}", } }, -- cgit v1.1