File: count.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 (24 lines) | stat: -rwxr-xr-x 535 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
#!/usr/bin/perl -w
# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $
# Some count checks
use strict;

my $test='count';
print "1..2\n";

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 $count = @output;
foreach (@output) {
  s/.+:\s+//;
  print $_;
}
print "ok 2\n" unless $count == 2;

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