1 2run_test() { 3 w='@ @' 4 check() { 5 [ "$v" = "$w" ] || echo "Expected $w got $v" 6 } 7 8 local v=$w 9 check 10 11 HOME=/known/value 12 check() { 13 [ "$v" = ~ ] || echo "Expected $HOME got $v" 14 } 15 16 local v=~ 17 check 18 19 check() { 20 [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" 21 } 22 23 local v=x:~ 24 check 25} 26 27run_test 28