diff options
Diffstat (limited to 'Test/C04funcdef.ztst')
-rw-r--r-- | Test/C04funcdef.ztst | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst index 88321c432..b8509b25c 100644 --- a/Test/C04funcdef.ztst +++ b/Test/C04funcdef.ztst @@ -53,6 +53,26 @@ >b: redirection >a: redirection + define_multiple() { + fn1 fn2 fn3() { + print This is $0 + } + } + which -x2 define_multiple + define_multiple + fn1 + fn2 + fn3 +0: Safe output of multiple function definitions +>define_multiple () { +> function fn1 fn2 fn3 { +> print This is $0 +> } +>} +>This is fn1 +>This is fn2 +>This is fn3 + functions -M m1 m1() { (( $# )) } print $(( m1() )) @@ -307,7 +327,7 @@ # lsfoo should not be expanded as an anonymous function argument alias lsfoo='This is not ls.' () (echo anon func; echo "$@") lsfoo -0:Anonmous function with arguments in a form nobody sane would ever use but unfortunately we have to support anyway +0:Anonymous function with arguments in a form nobody sane would ever use but unfortunately we have to support anyway >anon func >lsfoo |