diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush_test/hush-vars/var_preserved.right | 4 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_preserved.tests | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_preserved.right b/shell/hush_test/hush-vars/var_preserved.right new file mode 100644 index 000000000..b0def4bb6 --- /dev/null +++ b/shell/hush_test/hush-vars/var_preserved.right | |||
@@ -0,0 +1,4 @@ | |||
1 | a=a | ||
2 | a=a | ||
3 | a=a | ||
4 | OK | ||
diff --git a/shell/hush_test/hush-vars/var_preserved.tests b/shell/hush_test/hush-vars/var_preserved.tests new file mode 100755 index 000000000..132d387b4 --- /dev/null +++ b/shell/hush_test/hush-vars/var_preserved.tests | |||
@@ -0,0 +1,16 @@ | |||
1 | export a=a | ||
2 | |||
3 | # external program | ||
4 | a=b /bin/true | ||
5 | env | grep ^a= | ||
6 | |||
7 | # builtin | ||
8 | a=b true | ||
9 | env | grep ^a= | ||
10 | |||
11 | # exec with redirection only | ||
12 | # in bash, this leaks! | ||
13 | a=b exec 1>&1 | ||
14 | env | grep ^a= | ||
15 | |||
16 | echo OK | ||