File: misc.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 (23 lines) | stat: -rw-r--r-- 577 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
21
22
23

# Misc tests

# #1: "speedy /dev/null" wouldn't work
# #2: if backendprog is not executable, should get an error message, not
# a coredump

print "1..2\n";

my $out = `$ENV{SPEEDY} /dev/null`;
my $ok = $out eq '' && $? == 0;
print $ok ? "ok\n" : "not ok\n";

utime time, time, 't/scripts/basic.1';
sleep 1;

my $save = $ENV{SPEEDY_BACKENDPROG};
$ENV{SPEEDY_BACKENDPROG} = '/bin/ls';
$out = `$ENV{SPEEDY} t/scripts/basic.1 2>&1`;
$ok = $? != 0 && $out =~ /cannot spawn/i;
#print STDERR "out=$out status=$?\n";
print $ok ? "ok\n" : "not ok\n";
$ENV{SPEEDY_BACKENDPROG} = $save;