aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-03 00:55:34 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-03 00:55:34 +0200
commitc775f829db2e25ffa384ffe1b6b6859cdddfa935 (patch)
treee9b83b0a4fb4e6dff4544e7fe2a525b2df71b61b /shell/hush_test/hush-misc
parent2feaa227a4ddbf642207beebe7ac5ce85c57f018 (diff)
downloadbusybox-c775f829db2e25ffa384ffe1b6b6859cdddfa935.tar.gz
sh testsuite: add tests for exitcode on failure to exec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r--shell/hush_test/hush-misc/exitcode_EACCES.right2
-rwxr-xr-xshell/hush_test/hush-misc/exitcode_EACCES.tests2
-rw-r--r--shell/hush_test/hush-misc/exitcode_ENOENT.right2
-rwxr-xr-xshell/hush_test/hush-misc/exitcode_ENOENT.tests2
4 files changed, 8 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/exitcode_EACCES.right b/shell/hush_test/hush-misc/exitcode_EACCES.right
new file mode 100644
index 000000000..a80d55137
--- /dev/null
+++ b/shell/hush_test/hush-misc/exitcode_EACCES.right
@@ -0,0 +1,2 @@
+hush: can't execute './': Permission denied
+126
diff --git a/shell/hush_test/hush-misc/exitcode_EACCES.tests b/shell/hush_test/hush-misc/exitcode_EACCES.tests
new file mode 100755
index 000000000..26b5c6116
--- /dev/null
+++ b/shell/hush_test/hush-misc/exitcode_EACCES.tests
@@ -0,0 +1,2 @@
+./
+echo $?
diff --git a/shell/hush_test/hush-misc/exitcode_ENOENT.right b/shell/hush_test/hush-misc/exitcode_ENOENT.right
new file mode 100644
index 000000000..d8315503f
--- /dev/null
+++ b/shell/hush_test/hush-misc/exitcode_ENOENT.right
@@ -0,0 +1,2 @@
+hush: can't execute './does_not_exist_for_sure': No such file or directory
+127
diff --git a/shell/hush_test/hush-misc/exitcode_ENOENT.tests b/shell/hush_test/hush-misc/exitcode_ENOENT.tests
new file mode 100755
index 000000000..7f1b88a99
--- /dev/null
+++ b/shell/hush_test/hush-misc/exitcode_ENOENT.tests
@@ -0,0 +1,2 @@
+./does_not_exist_for_sure
+echo $?