mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 19:29:02 +00:00
hush: add two testcases
This commit is contained in:
parent
e41fdbc279
commit
d40fa397e4
2
shell/hush_test/hush-bugs/env_and_func.right
Normal file
2
shell/hush_test/hush-bugs/env_and_func.right
Normal file
@ -0,0 +1,2 @@
|
||||
var=val
|
||||
var=old
|
6
shell/hush_test/hush-bugs/env_and_func.tests
Executable file
6
shell/hush_test/hush-bugs/env_and_func.tests
Executable file
@ -0,0 +1,6 @@
|
||||
# UNFIXED BUG
|
||||
|
||||
var=old
|
||||
f() { echo "var=$var"; }
|
||||
var=val f
|
||||
echo "var=$var"
|
5
shell/hush_test/hush-misc/func_args1.right
Normal file
5
shell/hush_test/hush-misc/func_args1.right
Normal file
@ -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
|
10
shell/hush_test/hush-misc/func_args1.tests
Executable file
10
shell/hush_test/hush-misc/func_args1.tests
Executable file
@ -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"
|
Loading…
Reference in New Issue
Block a user