diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-vars/var_nested1.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_nested1.tests | 16 | ||||
-rw-r--r-- | shell/hush_test/hush-vars/var_nested2.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_nested2.tests | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_nested1.right b/shell/hush_test/hush-vars/var_nested1.right new file mode 100644 index 0000000..f4bc5f4 --- /dev/null +++ b/shell/hush_test/hush-vars/var_nested1.right @@ -0,0 +1,3 @@ +Expected:AB Actual:AB +Expected:Ab Actual:Ab +Expected:ab Actual:ab diff --git a/shell/hush_test/hush-vars/var_nested1.tests b/shell/hush_test/hush-vars/var_nested1.tests new file mode 100755 index 0000000..59e4a14 --- /dev/null +++ b/shell/hush_test/hush-vars/var_nested1.tests @@ -0,0 +1,16 @@ +f() { a=A; b=B; } + +a=a +b=b +f +echo Expected:AB Actual:$a$b + +a=a +b=b +b= f +echo Expected:Ab Actual:$a$b + +a=a +b=b +a= b= f +echo Expected:ab Actual:$a$b diff --git a/shell/hush_test/hush-vars/var_nested2.right b/shell/hush_test/hush-vars/var_nested2.right new file mode 100644 index 0000000..c930d97 --- /dev/null +++ b/shell/hush_test/hush-vars/var_nested2.right @@ -0,0 +1 @@ +aB diff --git a/shell/hush_test/hush-vars/var_nested2.tests b/shell/hush_test/hush-vars/var_nested2.tests new file mode 100755 index 0000000..e886586 --- /dev/null +++ b/shell/hush_test/hush-vars/var_nested2.tests @@ -0,0 +1,2 @@ +# the bug was easier to trigger in one-liner form +a=a; b=b; f() { a=A; b=B; }; a= f; echo $a$b |