diff options
Diffstat (limited to 'tests/killall.test')
-rw-r--r-- | tests/killall.test | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tests/killall.test b/tests/killall.test index 7b2cee33..100ac7ca 100644 --- a/tests/killall.test +++ b/tests/killall.test @@ -4,18 +4,11 @@ #testing "name" "command" "result" "infile" "stdin" -echo -e "#!$(which sh)\nwhile true; do sleep 0.1; done" > toybox.test -chmod a+x toybox.test -cp toybox.test toybox.killall.test.script +echo "#!/bin/sh +yes > /dev/null" > toybox.killall.test.script +chmod a+x toybox.killall.test.script -tst=toybox.test -(./$tst 2>/dev/null &) -testing "short name" "killall -w $tst && echo killed ; sleep 0.1; \ - pgrep -l $tst || echo really" "killed\nreally\n" "" "" +./toybox.killall.test.script & +testing "script" "killall toybox.killall.test.script && echo killed ; pgrep -l toybox.killall.test.script || echo really" "killed\nreally\n" "" "" -tst=toybox.killall.test.script -(./$tst 2>/dev/null &) -testing "long name" "killall -w $tst && echo killed ; sleep 0.1; \ - pgrep -l $tst || echo really" "killed\nreally\n" "" "" - -rm -f toybox.killall.test.script toybox.test +rm -f toybox.killall.test.script |