aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-05-21 18:24:21 -0400
committerMike Frysinger <vapier@gentoo.org>2009-05-21 18:35:08 -0400
commit12bcc76e9b95d2705912e8ad4e02c6fae374e844 (patch)
tree56dc9e6372c538e32fa05349ed23968e47ab5f95 /shell/hush_test/hush-misc
parent7b424fe738e554e41e3c581e8e13808e317e53f0 (diff)
downloadbusybox-12bcc76e9b95d2705912e8ad4e02c6fae374e844.tar.gz
hush_test: test for subshell function syntax
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r--shell/hush_test/hush-misc/func5.right3
-rwxr-xr-xshell/hush_test/hush-misc/func5.tests9
2 files changed, 12 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/func5.right b/shell/hush_test/hush-misc/func5.right
new file mode 100644
index 000000000..01e79c32a
--- /dev/null
+++ b/shell/hush_test/hush-misc/func5.right
@@ -0,0 +1,3 @@
+1
+2
+3
diff --git a/shell/hush_test/hush-misc/func5.tests b/shell/hush_test/hush-misc/func5.tests
new file mode 100755
index 000000000..9c5f9fa48
--- /dev/null
+++ b/shell/hush_test/hush-misc/func5.tests
@@ -0,0 +1,9 @@
+f() { echo $1; }
+f 1
+
+# hush fails on this syntax, but i've never seen anyone use it ...
+#f() ( echo $1; )
+f 2
+
+#f() ( echo $1 )
+f 3