aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-misc
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-misc')
-rw-r--r--shell/ash_test/ash-misc/func_bash1.right12
-rwxr-xr-xshell/ash_test/ash-misc/func_bash1.tests28
2 files changed, 40 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/func_bash1.right b/shell/ash_test/ash-misc/func_bash1.right
new file mode 100644
index 000000000..41bf8828c
--- /dev/null
+++ b/shell/ash_test/ash-misc/func_bash1.right
@@ -0,0 +1,12 @@
11
22
33
41
52
63
71
82
93
101
112
123
diff --git a/shell/ash_test/ash-misc/func_bash1.tests b/shell/ash_test/ash-misc/func_bash1.tests
new file mode 100755
index 000000000..2cc0970e8
--- /dev/null
+++ b/shell/ash_test/ash-misc/func_bash1.tests
@@ -0,0 +1,28 @@
1function f() { echo $1; }
2f 1
3
4function f() ( echo $1; )
5f 2
6
7function f() ( echo $1 )
8f 3
9
10function f() for i in 1 2 3; do
11 echo $i
12done
13f
14
15function f { echo $1; }
16f 1
17
18# the next two don't work
19#function f ( echo $1; )
20f 2
21
22#function f ( echo $1 )
23f 3
24
25function f for i in 1 2 3; do
26 echo $i
27done
28f