From 1f4cf517f5803b0e300906c487d365a331122091 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 16 May 2007 10:39:24 +0000 Subject: hush: fix expansion of quoted $VAR, $* and $@ --- shell/hush_test/hush-parsing/quote4.right | 1 + shell/hush_test/hush-parsing/quote4.tests | 2 ++ shell/hush_test/hush-parsing/starquoted.right | 8 ++++++++ shell/hush_test/hush-parsing/starquoted.tests | 8 ++++++++ 4 files changed, 19 insertions(+) create mode 100644 shell/hush_test/hush-parsing/quote4.right create mode 100755 shell/hush_test/hush-parsing/quote4.tests create mode 100644 shell/hush_test/hush-parsing/starquoted.right create mode 100755 shell/hush_test/hush-parsing/starquoted.tests (limited to 'shell/hush_test/hush-parsing') diff --git a/shell/hush_test/hush-parsing/quote4.right b/shell/hush_test/hush-parsing/quote4.right new file mode 100644 index 0000000..b2901ea --- /dev/null +++ b/shell/hush_test/hush-parsing/quote4.right @@ -0,0 +1 @@ +a b diff --git a/shell/hush_test/hush-parsing/quote4.tests b/shell/hush_test/hush-parsing/quote4.tests new file mode 100755 index 0000000..f1dabfa --- /dev/null +++ b/shell/hush_test/hush-parsing/quote4.tests @@ -0,0 +1,2 @@ +a_b='a b' +echo "$a_b" diff --git a/shell/hush_test/hush-parsing/starquoted.right b/shell/hush_test/hush-parsing/starquoted.right new file mode 100644 index 0000000..b56323f --- /dev/null +++ b/shell/hush_test/hush-parsing/starquoted.right @@ -0,0 +1,8 @@ +.1 abc d e f. +.1. +.abc. +.d e f. +.-1 abc d e f-. +.-1. +.abc. +.d e f-. diff --git a/shell/hush_test/hush-parsing/starquoted.tests b/shell/hush_test/hush-parsing/starquoted.tests new file mode 100755 index 0000000..2fe49b1 --- /dev/null +++ b/shell/hush_test/hush-parsing/starquoted.tests @@ -0,0 +1,8 @@ +if test $# = 0; then + exec "$THIS_SH" "$0" 1 abc 'd e f' +fi + +for a in "$*"; do echo ".$a."; done +for a in "$@"; do echo ".$a."; done +for a in "-$*-"; do echo ".$a."; done +for a in "-$@-"; do echo ".$a."; done -- cgit v1.1