hush: "adopt" ash signal4.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -9486,7 +9486,7 @@ static int FAST_FUNC builtin_trap(char **argv)
|
|||||||
if (sig < 0 || sig >= NSIG) {
|
if (sig < 0 || sig >= NSIG) {
|
||||||
ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
/* Mimic bash message exactly */
|
/* Mimic bash message exactly */
|
||||||
bb_perror_msg("trap: %s: invalid signal specification", argv[-1]);
|
bb_error_msg("trap: %s: invalid signal specification", argv[-1]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
shell/hush_test/hush-signals/signal4.right
Normal file
4
shell/hush_test/hush-signals/signal4.right
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
hush: trap: BADNAME: invalid signal specification
|
||||||
|
1
|
||||||
|
Trapped
|
||||||
|
Ok
|
5
shell/hush_test/hush-signals/signal4.tests
Executable file
5
shell/hush_test/hush-signals/signal4.tests
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
trap "echo Trapped" BADNAME TERM; echo $?
|
||||||
|
kill $$
|
||||||
|
echo Ok
|
Reference in New Issue
Block a user