diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-24 20:51:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-24 20:51:53 +0000 |
commit | e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e (patch) | |
tree | 2ba0896feb47418c5a21ed339b662ad13f568904 /posix/wordexp-tst.sh | |
parent | 3dd90163bb9ecb7d8b6c7a2f7d6bc746571a7ea9 (diff) | |
download | glibc-e9fc7bbb8949a781cc0d65c8a54c3b6b3b49030e.tar.gz |
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-tst.sh')
-rwxr-xr-x | posix/wordexp-tst.sh | 15 |
1 files changed, 14 insertions, 1 deletions
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 |