xref: /freebsd/bin/sh/tests/expansion/local2.0 (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1
2run_test() {
3	w='@ @'
4	check() {
5		[ "$v" = "$w" ] || echo "Expected $w got $v"
6	}
7
8	command local v=$w
9	check
10	command command local v=$w
11	check
12
13	HOME=/known/value
14	check() {
15		[ "$v" = ~ ] || echo "Expected $HOME got $v"
16	}
17
18	command local v=~
19	check
20	command command local v=~
21	check
22
23	check() {
24		[ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v"
25	}
26
27	command local v=x:~
28	check
29	command command local v=x:~
30	check
31}
32
33run_test
34