[Nagiosplug-checkins] nagiosplug/plugins-scripts/t check_rpc.t,1.1.1.1,1.2

Peter Bray illumino at users.sourceforge.net
Sun Jul 24 18:48:20 CEST 2005


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17473/plugins-scripts/t

Modified Files:
	check_rpc.t 
Log Message:
[1185704] New Testing Infrastructure.
Complete rewrite of the original testing infrastructure and 
all test cases (to use the new infrastructure)
See NPTest.pm and issue 1185704 for more details.


Index: check_rpc.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/t/check_rpc.t,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- check_rpc.t	28 Feb 2002 06:43:00 -0000	1.1.1.1
+++ check_rpc.t	25 Jul 2005 01:47:15 -0000	1.2
@@ -1,19 +1,22 @@
+#! /usr/bin/perl -w -I ..
+#
+# Remote Procedure Call (RPC) Tests via check_rpc
+#
+# $Id$
+#
+
 use strict;
 use Test;
-use vars qw($tests);
+use NPTest;
 
+use vars qw($tests);
 BEGIN {$tests = 2; plan tests => $tests}
 
-my $null = '';
-my $cmd;
-my $str;
-my $t=0;
+my $successOutput = '/^check_rpc/';
 
-$cmd = "./check_rpc -V";
-$str = `$cmd`;
-$t += ok $?>>8,0;
-print "Test was: $cmd\n" if ($?);
-$t += ok $str, '/^check_rpc/';
+my $t;
+
+$t += checkCmd( "./check_rpc -V",   0, $successOutput );
 
 exit(0) if defined($Test::Harness::VERSION);
 exit($tests - $t);





More information about the Commits mailing list