summaryrefslogtreecommitdiff
path: root/Test/C04funcdef.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C04funcdef.ztst')
-rw-r--r--Test/C04funcdef.ztst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index af469c527..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() ))