From cba79a87f86f4f8d3c5b21ff7024b392402cf287 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 25 Jan 2018 14:07:40 +0100 Subject: hush: fix two corner cases in ${v/pattern/repl}. Closes 10686 function old new delta expand_one_var 1592 1618 +26 Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right | 2 ++ shell/hush_test/hush-vars/var_bash_repl_empty_pattern.tests | 3 +++ shell/hush_test/hush-vars/var_bash_repl_empty_var.right | 2 ++ shell/hush_test/hush-vars/var_bash_repl_empty_var.tests | 3 +++ 4 files changed, 10 insertions(+) create mode 100644 shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right create mode 100755 shell/hush_test/hush-vars/var_bash_repl_empty_pattern.tests create mode 100644 shell/hush_test/hush-vars/var_bash_repl_empty_var.right create mode 100755 shell/hush_test/hush-vars/var_bash_repl_empty_var.tests (limited to 'shell/hush_test/hush-vars') diff --git a/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right b/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right new file mode 100644 index 0000000..d400a7e --- /dev/null +++ b/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right @@ -0,0 +1,2 @@ +v +Ok:0 diff --git a/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.tests b/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.tests new file mode 100755 index 0000000..6e8aa2a --- /dev/null +++ b/shell/hush_test/hush-vars/var_bash_repl_empty_pattern.tests @@ -0,0 +1,3 @@ +v=v +echo ${v//} +echo Ok:$? diff --git a/shell/hush_test/hush-vars/var_bash_repl_empty_var.right b/shell/hush_test/hush-vars/var_bash_repl_empty_var.right new file mode 100644 index 0000000..8929167 --- /dev/null +++ b/shell/hush_test/hush-vars/var_bash_repl_empty_var.right @@ -0,0 +1,2 @@ + +Ok:0 diff --git a/shell/hush_test/hush-vars/var_bash_repl_empty_var.tests b/shell/hush_test/hush-vars/var_bash_repl_empty_var.tests new file mode 100755 index 0000000..73a43d3 --- /dev/null +++ b/shell/hush_test/hush-vars/var_bash_repl_empty_var.tests @@ -0,0 +1,3 @@ +v='' +echo ${v/*/w} +echo Ok:$? -- cgit v1.1