mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-01 02:08:16 +02:00
61 lines
1.3 KiB
Diff
61 lines
1.3 KiB
Diff
busybox does not work well with argv0 changes
|
|
|
|
--- a/tests/exec-y.tst
|
|
+++ b/tests/exec-y.tst
|
|
@@ -24,17 +24,17 @@ echo not reached
|
|
__IN__
|
|
|
|
test_oE -e 0 'executing with specific name (-a)'
|
|
-exec -a foo sh -c 'echo "$0"'
|
|
+exec -a ash sh -c 'echo "$0"'
|
|
echo not reached
|
|
__IN__
|
|
-foo
|
|
+ash
|
|
__OUT__
|
|
|
|
test_oE -e 0 'executing with specific name (--as)'
|
|
-exec --as=foo sh -c 'echo "$0"'
|
|
+exec --as=ash sh -c 'echo "$0"'
|
|
echo not reached
|
|
__IN__
|
|
-foo
|
|
+ash
|
|
__OUT__
|
|
|
|
# This test fails on some environments, notably Cygwin, which implicitly adds
|
|
--- a/tests/simple-p.tst
|
|
+++ b/tests/simple-p.tst
|
|
@@ -181,7 +181,7 @@ echo command
|
|
printf '[%s]\n' "$@"
|
|
END
|
|
chmod a+x dir2/ext_cmd
|
|
-ln -s "$(command -v sh)" dir2/link_to_sh
|
|
+ln -s "$(command -v sh)" dir2/ash
|
|
|
|
test_o 'searching PATH for command'
|
|
PATH=./dir1:./dir2:./dir3:$PATH
|
|
@@ -278,19 +278,19 @@ __OUT__
|
|
test_o 'argv[0] (command name without slash)'
|
|
sh -c 'echo "$0"'
|
|
PATH=./dir2:$PATH
|
|
-link_to_sh -c 'echo "$0"'
|
|
+ash -c 'echo "$0"'
|
|
__IN__
|
|
sh
|
|
-link_to_sh
|
|
+ash
|
|
__OUT__
|
|
|
|
testcase "$LINENO" 'argv[0] (command name with slash)' \
|
|
3<<\__IN__ 4<<__OUT__ 5<&-
|
|
"$(command -v sh)" -c 'echo "$0"'
|
|
-./dir2/link_to_sh -c 'echo "$0"'
|
|
+./dir2/ash -c 'echo "$0"'
|
|
__IN__
|
|
$(command -v sh)
|
|
-./dir2/link_to_sh
|
|
+./dir2/ash
|
|
__OUT__
|
|
|
|
# vim: set ft=sh ts=8 sts=4 sw=4 et:
|