sh: Add tests where "export" does not parse differently.
It is planned to expand variable assignments as assignments (no word splitting, different tilde expansion) when they follow a "declaration utility" (export, readonly or local). However, a quoted character cannot be part of a "name" so things like \v=~ are not assignments, and the existing behaviour applies.
This commit is contained in:
parent
f8079271e6
commit
a017ea22e5
13
tools/regression/bin/sh/expansion/export1.0
Normal file
13
tools/regression/bin/sh/expansion/export1.0
Normal file
@ -0,0 +1,13 @@
|
||||
# $FreeBSD$
|
||||
|
||||
w='@ vv=6'
|
||||
|
||||
v=0 vv=0
|
||||
export \v=$w
|
||||
[ "$v" = "@" ] || echo "Expected @ got $v"
|
||||
[ "$vv" = "6" ] || echo "Expected 6 got $vv"
|
||||
|
||||
HOME=/known/value
|
||||
|
||||
export \v=~
|
||||
[ "$v" = \~ ] || echo "Expected ~ got $v"
|
Loading…
x
Reference in New Issue
Block a user