diff options
author | jilles <jilles@FreeBSD.org> | 2012-07-13 22:29:02 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-07-13 22:29:02 +0000 |
commit | 5bce107d09da72e4dfea6bc517ffa20c943f6742 (patch) | |
tree | c2796f341b786c9f2a2c7905c28cc975e6190f1a /tools/regression | |
parent | 76bd823f74d3af7f79b67f482776b3768489aaab (diff) | |
download | FreeBSD-src-5bce107d09da72e4dfea6bc517ffa20c943f6742.zip FreeBSD-src-5bce107d09da72e4dfea6bc517ffa20c943f6742.tar.gz |
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.
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/bin/sh/expansion/export1.0 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/expansion/export1.0 b/tools/regression/bin/sh/expansion/export1.0 new file mode 100644 index 0000000..4ee3ef4 --- /dev/null +++ b/tools/regression/bin/sh/expansion/export1.0 @@ -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" |