]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/expansion/local2.0
shell_cmds-207.11.1.tar.gz
[apple/shell_cmds.git] / sh / tests / expansion / local2.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/expansion/local2.0 238468 2012-07-15 10:19:43Z jilles $
71aad674
A
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