diff options
author | Ron Yorston <rmy@pobox.com> | 2021-03-24 11:55:30 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-03-24 12:43:15 +0000 |
commit | 355a7a6c1e9626b7afe8758a6095f3cf275c52e1 (patch) | |
tree | 6dab679c15b049cab97212e0b43077132eec1fbe /shell/ash_test/ash-misc | |
parent | 71ecc8033e6989996057b32577e71148fd544596 (diff) | |
parent | 889425812b5cda8b3394d73253cbde7355fb1115 (diff) | |
download | busybox-w32-w32_1_26_2.tar.gz busybox-w32-w32_1_26_2.tar.bz2 busybox-w32-w32_1_26_2.zip |
Merge tag '1_26_2' into w32_1_26_2w32_1_26_2
Diffstat (limited to 'shell/ash_test/ash-misc')
-rw-r--r-- | shell/ash_test/ash-misc/exitcode2.right | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/exitcode2.tests | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/exitcode2.right b/shell/ash_test/ash-misc/exitcode2.right new file mode 100644 index 000000000..f7cb983c6 --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode2.right | |||
@@ -0,0 +1,4 @@ | |||
1 | ./test.sh: line 1: syntax error: unexpected ")" | ||
2 | Done:2 | ||
3 | ./exitcode2.tests: line 11: can't open does_not_exist: no such file | ||
4 | Done:1 | ||
diff --git a/shell/ash_test/ash-misc/exitcode2.tests b/shell/ash_test/ash-misc/exitcode2.tests new file mode 100755 index 000000000..79a6ebd50 --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode2.tests | |||
@@ -0,0 +1,12 @@ | |||
1 | # syntax error should return status 2 | ||
2 | cat >test.sh <<EOF | ||
3 | ) | ||
4 | EOF | ||
5 | chmod +x test.sh | ||
6 | $THIS_SH ./test.sh | ||
7 | echo Done:$? | ||
8 | rm -f test.sh | ||
9 | |||
10 | # redirection error with special builtin should return status 1 | ||
11 | (eval cat <does_not_exist) | ||
12 | echo Done:$? | ||