summaryrefslogtreecommitdiff
path: root/tests/executable-script.sh
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-24 18:19:08 +0100
committerBruno Haible <bruno@clisp.org>2020-12-24 18:19:08 +0100
commitad6d18b5699f75d9fb356b1ef6ea0ed4c50e0216 (patch)
tree8dd06d8301b0f82f8d160fb7eda1b04739793235 /tests/executable-script.sh
parentd9c121346a283503350c0ac7cd6eb5092e87181b (diff)
downloadgnulib-ad6d18b5699f75d9fb356b1ef6ea0ed4c50e0216.tar.gz
windows-spawn: Improve errno upon failure on native Windows.
* lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC. * tests/executable-script.sh: New file. * tests/test-posix_spawn-script.c (main): Also try executing executable-script.sh. * tests/test-posix_spawnp-script.c (main): Likewise. * tests/test-execute-script.c (main): Likewise. * tests/test-spawn-pipe-script.c (main): Likewise. * modules/posix_spawn-tests (Files): Add tests/executable-script.sh. * modules/posix_spawnp-tests (Files): Likewise. * modules/execute-tests (Files): Likewise. * modules/spawn-pipe-tests (Files): Likewise.
Diffstat (limited to 'tests/executable-script.sh')
-rwxr-xr-xtests/executable-script.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/executable-script.sh b/tests/executable-script.sh
new file mode 100755
index 0000000000..993f41cf4c
--- /dev/null
+++ b/tests/executable-script.sh
@@ -0,0 +1,4 @@
+printf 'Halle '
+printf "Potta"
+# This script is intentionally not immediately recognizable as a shell script.
+# Don't add a #! header in the first line.