File: exit.t

package info (click to toggle)
speedy-cgi-perl 2.22-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,128 kB
  • ctags: 890
  • sloc: ansic: 4,487; sh: 1,105; perl: 945; makefile: 89
file content (20 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# Test exit status from backend
# Test 1 - normal exit 0
# Test 2 - non-normal exit
# Test 3 - kill with catchable sig
# Test 4 - kill wtih non-catchable sig
# Test 5 - kill our parent - should eventually get status of sigkill.

my @list = (0, 256, 15, 9, 9);

printf "1..%d\n", scalar @list;

for (my $i = 0; $i <= 4; ++$i) {
    my $val = system("$ENV{SPEEDY} t/scripts/exit $i");
    if ($val == $list[$i]) {
	print "ok\n";
    } else {
	print "not ok # got $val instead of $list[$i]\n";
    }
}