From a8b6dff97f353c41e208e7e567f100a6c7af4605 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 20 Mar 2009 12:05:14 +0000 Subject: hush: fix bug 207 and "hush -c" parameter passing. Now hush -c 'printf "%s\n" "$@"' (prints "\n") and hush -c 'printf "%s\n" "$@"' qwe asd (prints "asd\n") both work correctly --- shell/hush_test/hush-parsing/starquoted2.right | 1 + shell/hush_test/hush-parsing/starquoted2.tests | 3 +++ 2 files changed, 4 insertions(+) (limited to 'shell/hush_test/hush-parsing') diff --git a/shell/hush_test/hush-parsing/starquoted2.right b/shell/hush_test/hush-parsing/starquoted2.right index 46f2436..f4624da 100644 --- a/shell/hush_test/hush-parsing/starquoted2.right +++ b/shell/hush_test/hush-parsing/starquoted2.right @@ -1,2 +1,3 @@ Should be printed Should be printed +Empty: diff --git a/shell/hush_test/hush-parsing/starquoted2.tests b/shell/hush_test/hush-parsing/starquoted2.tests index 782d71b..3475ede 100755 --- a/shell/hush_test/hush-parsing/starquoted2.tests +++ b/shell/hush_test/hush-parsing/starquoted2.tests @@ -12,3 +12,6 @@ for a in "$@"""; do echo Should not be printed; done for a in """$@"; do echo Should not be printed; done for a in """$@"''"$@"''; do echo Should not be printed; done for a in ""; do echo Should be printed; done + +# Bug 207: "$@" expands to nothing, and we erroneously glob "%s\\n" twice: +printf "Empty:%s\\n" "$@" -- cgit v1.1