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