diff options
author | Denis Vlasenko | 2009-04-20 22:04:21 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-20 22:04:21 +0000 |
commit | ad4bd0548a5a9b630606ca95794cee8b31671c9a (patch) | |
tree | 41e681d086425d31f7ae0e0e36e94dff7bda40e0 /shell/hush_test/hush-misc | |
parent | d40fa397e45b35b62d1967a88036e06b4c061abe (diff) | |
download | busybox-ad4bd0548a5a9b630606ca95794cee8b31671c9a.zip busybox-ad4bd0548a5a9b630606ca95794cee8b31671c9a.tar.gz |
hush: export -n support
function old new delta
builtin_export 206 256 +50
set_local_var 248 265 +17
expand_variables 2204 2203 -1
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r-- | shell/hush_test/hush-misc/export-n.right | 10 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/export-n.tests | 37 |
2 files changed, 47 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/export-n.right b/shell/hush_test/hush-misc/export-n.right new file mode 100644 index 0000000..3d55bf7 --- /dev/null +++ b/shell/hush_test/hush-misc/export-n.right @@ -0,0 +1,10 @@ +export aaa1="'''" +export aaa2='' +export aaa3="'''"'abc' +export aaa8='8' +aaa9=9 +aaa10=10 +Nothing: +Nothing: +Nothing: +Done diff --git a/shell/hush_test/hush-misc/export-n.tests b/shell/hush_test/hush-misc/export-n.tests new file mode 100755 index 0000000..5252a1e --- /dev/null +++ b/shell/hush_test/hush-misc/export-n.tests @@ -0,0 +1,37 @@ +export aaa1="'''" +export aaa2="" +export aaa3="'''abc" +export | grep aaa.= + +export -n aaa1 +unset aaa2; export -n aaa2="ghi" +export -n aaa3="klm" +export | grep aaa.= + +export aaa4=4 aaa5=5 +export -n aaa4=4n +export -n aaa5 +export | grep aaa.= + +export aaa5=5 aaa6=6 aaa7=7 aaa8=8 +export -n aaa5 aaa6=6n aaa7 +export | grep aaa.= + +aaa9=9 +export -n aaa9 +set | grep ^aaa9= + +export aaa10=10 +export -n aaa10 +set | grep ^aaa10= + + +export EXPORTED=qwe +export -nnnnnn nnnnnn; echo "Nothing:"; env | grep nnnnnn + +export -n EXPORTED=123; echo "Nothing:"; env | grep ^EXPORTED + +export EXPORTED=qwe +export -n EXPORTED; EXPORTED=123; echo "Nothing:"; env | grep ^EXPORTED + +echo Done |