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-tst.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'posix/wordexp-tst.sh') diff --git a/posix/wordexp-tst.sh b/posix/wordexp-tst.sh index 57ef01383b..43dc0a5ac9 100755 --- a/posix/wordexp-tst.sh +++ b/posix/wordexp-tst.sh @@ -19,7 +19,6 @@ IFS=" \ " export IFS - ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 cat <<"EOF" | cmp - ${testout}1 || failed=1 @@ -92,4 +91,18 @@ we_wordv[1] = "c" we_wordv[2] = "d b" EOF +${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ +${common_objpfx}posix/wordexp-test '${#@} ${#2} *$**' two 3 4 > ${testout}10 +cat <<"EOF" | cmp - ${testout}10 || failed=1 +wordexp returned 0 +we_wordv[0] = "4" +we_wordv[1] = "3" +we_wordv[2] = "*${#@}" +we_wordv[3] = "${#2}" +we_wordv[4] = "*$**" +we_wordv[5] = "two" +we_wordv[6] = "3" +we_wordv[7] = "4*" +EOF + exit $failed -- cgit v1.2.3