From 12bcc76e9b95d2705912e8ad4e02c6fae374e844 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 May 2009 18:24:21 -0400 Subject: [PATCH] hush_test: test for subshell function syntax Signed-off-by: Mike Frysinger --- shell/hush_test/hush-misc/func5.right | 3 +++ shell/hush_test/hush-misc/func5.tests | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 shell/hush_test/hush-misc/func5.right create mode 100755 shell/hush_test/hush-misc/func5.tests 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 -- 2.25.1