Code

Fix check_nagios tests on MacOSX 10.4
[nagiosplug.git] / plugins / t / check_users.t
1 #! /usr/bin/perl -w -I ..
2 #
3 # Logged in Users Tests via check_users
4 #
5 # $Id$
6 #
8 use strict;
9 use Test;
10 use NPTest;
12 use vars qw($tests);
13 BEGIN {$tests = 4; plan tests => $tests}
15 my $successOutput = '/^USERS OK - [0-9]+ users currently logged in/';
16 my $failureOutput = '/^USERS CRITICAL - [0-9]+ users currently logged in/';
18 my $t;
20 $t += checkCmd( "./check_users 1000 1000", 0, $successOutput );
21 $t += checkCmd( "./check_users    0    0", 2, $failureOutput );
23 exit(0) if defined($Test::Harness::VERSION);
24 exit($tests - $t);