Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / tests / varenv4.sub
1 f()
2 {
3         local -a v
4         local -a w
5
6         g
7         echo "f: ${v[@]}, ${w[@]}"
8 }
9
10 g()
11 {
12         aux=v
13         declare -ga "$aux=( asdf fdsa )"
14         declare -ga w=( asdf fdsa )
15
16         echo "g: ${v[@]}, ${w[@]}"
17 }
18
19 f
20 echo "FIN: ${v[@]}, ${w[@]}"
21
22 unset v w
23 unset -f f g
24
25 f()
26 {
27         local  v
28         local  w
29
30         g
31         echo f: v = $v, w = $w
32 }
33
34 g()
35 {
36         aux=v
37         declare -g w=one
38         declare -g "$aux=two"
39
40         echo g: v = $v, w = $w
41 }
42
43 f
44 echo FIN: v = $v, w = $w