Fix INADDR_NONE value (for systems which don't define it).
[monitoring-plugins.git] / plugins / t / check_users.t
blob4b313d3061382e258f0ddda40beecba01afb6401
1 #! /usr/bin/perl -w -I ..
3 # Logged in Users Tests via check_users
5 # $Id$
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);