From 34179956f96370f5a53e73073d984d62135cd037 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 11 Apr 2018 13:47:59 +0200 Subject: hush: fix "$v" expansion in case patterns when v='[a]' function old new delta run_list 1053 1063 +10 setup_redirects 311 320 +9 encode_then_expand_string 135 142 +7 run_pipe 1784 1789 +5 expand_assignments 81 86 +5 expand_string_to_string 124 125 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/0 up/down: 37/0) Total: 37 bytes Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-quoting/case_glob1.right | 1 + shell/ash_test/ash-quoting/case_glob1.tests | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 shell/ash_test/ash-quoting/case_glob1.right create mode 100755 shell/ash_test/ash-quoting/case_glob1.tests (limited to 'shell/ash_test') diff --git a/shell/ash_test/ash-quoting/case_glob1.right b/shell/ash_test/ash-quoting/case_glob1.right new file mode 100644 index 000000000..b4785957b --- /dev/null +++ b/shell/ash_test/ash-quoting/case_glob1.right @@ -0,0 +1 @@ +s diff --git a/shell/ash_test/ash-quoting/case_glob1.tests b/shell/ash_test/ash-quoting/case_glob1.tests new file mode 100755 index 000000000..8dbbc0fb1 --- /dev/null +++ b/shell/ash_test/ash-quoting/case_glob1.tests @@ -0,0 +1,8 @@ +g='[3](a)(b)(c)' +s='[3](a)(b)(c)' +case $g in +"$s") echo s + ;; +*) echo "*" + ;; +esac -- cgit v1.2.3