1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/bin/sh
TEST_SUBJECT="kill ESRCH"
. test_prelude
fmt > test.ok << 'fubar'
kill(pid = 42, sig = SIGKILL) failed, No such process (ESRCH) because the
pid process does not exist
fubar
test $? -eq 0 || no_result
explain -eESRCH kill 42 SIGKILL > test.out.4
test $? -eq 0 || fail
fmt -w 800 test.out.4 > test.out.3
test $? -eq 0 || no_result
sed -e 's|(pid = 42 ".*",|(pid = 42,|' test.out.3 > test.out.2
test $? -eq 0 || no_result
fmt test.out.2 > test.out
test $? -eq 0 || no_result
diff test.ok test.out
test $? -eq 0 || fail
pass
|