From d40fa397e45b35b62d1967a88036e06b4c061abe Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 20 Apr 2009 10:52:31 +0000 Subject: [PATCH] hush: add two testcases --- shell/hush_test/hush-bugs/env_and_func.right | 2 ++ shell/hush_test/hush-bugs/env_and_func.tests | 6 ++++++ shell/hush_test/hush-misc/func_args1.right | 5 +++++ shell/hush_test/hush-misc/func_args1.tests | 10 ++++++++++ 4 files changed, 23 insertions(+) create mode 100644 shell/hush_test/hush-bugs/env_and_func.right create mode 100755 shell/hush_test/hush-bugs/env_and_func.tests create mode 100644 shell/hush_test/hush-misc/func_args1.right create mode 100755 shell/hush_test/hush-misc/func_args1.tests diff --git a/shell/hush_test/hush-bugs/env_and_func.right b/shell/hush_test/hush-bugs/env_and_func.right new file mode 100644 index 000000000..4a1545058 --- /dev/null +++ b/shell/hush_test/hush-bugs/env_and_func.right @@ -0,0 +1,2 @@ +var=val +var=old diff --git a/shell/hush_test/hush-bugs/env_and_func.tests b/shell/hush_test/hush-bugs/env_and_func.tests new file mode 100755 index 000000000..d62c1af40 --- /dev/null +++ b/shell/hush_test/hush-bugs/env_and_func.tests @@ -0,0 +1,6 @@ +# UNFIXED BUG + +var=old +f() { echo "var=$var"; } +var=val f +echo "var=$var" diff --git a/shell/hush_test/hush-misc/func_args1.right b/shell/hush_test/hush-misc/func_args1.right new file mode 100644 index 000000000..2dfb9629b --- /dev/null +++ b/shell/hush_test/hush-misc/func_args1.right @@ -0,0 +1,5 @@ +params: a b c +'f 1 2 3' called +params: a b c +'f 1 2 3' called +params: a b c diff --git a/shell/hush_test/hush-misc/func_args1.tests b/shell/hush_test/hush-misc/func_args1.tests new file mode 100755 index 000000000..157921fb1 --- /dev/null +++ b/shell/hush_test/hush-misc/func_args1.tests @@ -0,0 +1,10 @@ +# UNFIXED BUG + +f() { echo "'f $1 $2 $3' called"; } + +set -- a b c +echo "params: $1 $2 $3" +f 1 2 3 +echo "params: $1 $2 $3" +true | f 1 2 3 +echo "params: $1 $2 $3" -- 2.25.1