]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/func.right
Imported from ../bash-2.04.tar.gz.
[thirdparty/bash.git] / tests / func.right
CommitLineData
d166f048
JA
1a returns 5
2b returns 4
3c returns 3
4d returns 2
5in e
6e returned 25
7x is 25
8ZZ
9abcde
10defghi
11ZZ
125
130
14AVAR
15AVAR
16foo
17foo
18AVAR
195
205
21f1
22f1 ()
23{
24 ( return 5 );
25 status=$?;
26 echo $status;
27 return $status
28}
bb70624e
JA
29before: try to assign to FUNCNAME
30outside: FUNCNAME =
31before: FUNCNAME = func
32FUNCNAME = func2
33after: FUNCNAME = func
34outside2: FUNCNAME =
35function
36zf is a function
37zf ()
38{
39 echo this is zf
40}
41f is a function
42f ()
43{
44 echo f-x;
45 echo f-y
46} 1>&2
47subshell
48f is a function
49f ()
50{
51 echo f-x;
52 echo f-y
53} 1>&2
54f2 is a function
55f2 ()
56{
57 echo f2-a;
58 function f3 ()
59 {
60 echo f3-a;
61 echo f3-b
62 } 1>&2;
63 f3
64}
65subshell
66f2 is a function
67f2 ()
68{
69 echo f2-a;
70 function f3 ()
71 {
72 echo f3-a;
73 echo f3-b
74 } 1>&2;
75 f3
76}
77f4 is a function
78f4 ()
79{
80 echo f4-a;
81 function f5 ()
82 {
83 echo f5-a;
84 echo f5-b
85 } 1>&2;
86 f5
87} 2>&1
88subshell
89f4 is a function
90f4 ()
91{
92 echo f4-a;
93 function f5 ()
94 {
95 echo f5-a;
96 echo f5-b
97 } 1>&2;
98 f5
99} 2>&1
100testgrp is a function
101testgrp ()
102{
103 echo testgrp-a;
104 {
105 echo tg-x;
106 echo tg-y
107 } 1>&2;
108 echo testgrp-b
109}
110subshell
111testgrp is a function
112testgrp ()
113{
114 echo testgrp-a;
115 {
116 echo tg-x;
117 echo tg-y
118 } 1>&2;
119 echo testgrp-b
120}