]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/bin/sh/expansion/local2.0
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / bin / sh / expansion / local2.0
1 # $FreeBSD$
2
3 run_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
34 run_test