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:
Jilles Tjoelker 2012-07-13 22:29:02 +00:00
parent f8079271e6
commit a017ea22e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238430

View 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"