File: full.t

package info (click to toggle)
ps-watcher 1.08-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772 kB
  • sloc: sh: 2,907; perl: 1,281; makefile: 104
file content (34 lines) | stat: -rwxr-xr-x 684 bytes parent folder | download | duplicates (11)
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
#!/usr/bin/perl -w
# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $
# Some count checks
use strict;
use Test::More;
use Config;

if ('cygwin' eq $Config{osname}) {
    plan( tests => 1);
} else {
    plan( tests => 2);
}

my $test='full';

my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.';
my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`;

# First line is Id line. This doesn't count in testing.
shift @output;

my $i=1;
foreach (@output) {
  if (/^.+:\s+.*ok/) {
    s/.+:\s+//;
    my $result = sprintf "ok %d", $i;
    $i++;
    ok($_ =~ m{$result});
  }  
}

#;;; Local Variables: ***
#;;; mode:perl ***
#;;; End: ***