hush testsuite: add many tests from ash testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
4
shell/hush_test/hush-standalone/noexec_gets_no_env.right
Normal file
4
shell/hush_test/hush-standalone/noexec_gets_no_env.right
Normal file
@@ -0,0 +1,4 @@
|
||||
VAR7=VAL
|
||||
0
|
||||
VAR8=VAL
|
||||
0
|
5
shell/hush_test/hush-standalone/noexec_gets_no_env.tests
Executable file
5
shell/hush_test/hush-standalone/noexec_gets_no_env.tests
Executable file
@@ -0,0 +1,5 @@
|
||||
export VAR7=VAL
|
||||
env | grep ^VAR7=
|
||||
echo $?
|
||||
VAR8=VAL env | grep ^VAR8=
|
||||
echo $?
|
@@ -0,0 +1 @@
|
||||
0
|
6
shell/hush_test/hush-standalone/nofork_trashes_getopt.tests
Executable file
6
shell/hush_test/hush-standalone/nofork_trashes_getopt.tests
Executable file
@@ -0,0 +1,6 @@
|
||||
# In this test, rm is NOFORK and it modifies getopt internal state
|
||||
rm -f non_existent_file
|
||||
# Subsequent hexdump is run as NOEXEC, and thus still uses this state
|
||||
hexdump </dev/null
|
||||
# Did hexdump segfault etc?
|
||||
echo $?
|
1
shell/hush_test/hush-standalone/var_standalone1.right
Normal file
1
shell/hush_test/hush-standalone/var_standalone1.right
Normal file
@@ -0,0 +1 @@
|
||||
Done: 1
|
2
shell/hush_test/hush-standalone/var_standalone1.tests
Executable file
2
shell/hush_test/hush-standalone/var_standalone1.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
VAR=42 $THIS_SH -c 'unset VAR; env | grep ^VAR'
|
||||
echo Done: $?
|
Reference in New Issue
Block a user