From 1a5a83bb82c35d888229fe9f815fbc663c0f4d3c Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Fri, 21 Jan 2011 13:14:33 +0000 Subject: Fix for regex input of '|', being output causing problems with Nagios' parsing of performance data. Now replaced with ',' --- plugins/tests/check_procs.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/tests/check_procs.t') diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t index 1d0c034e..d71c83a2 100644 --- a/plugins/tests/check_procs.t +++ b/plugins/tests/check_procs.t @@ -8,7 +8,7 @@ use Test::More; use NPTest; if (-x "./check_procs") { - plan tests => 48; + plan tests => 50; } else { plan skip_all => "No check_procs compiled"; } @@ -113,3 +113,7 @@ $result = NPTest->testCmd( "$command --metric=RSS -c 70000 -v" ); is( $result->return_code, 2, "Checking against RSS > 70MB" ); is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" ); +$result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" ); +is( $result->return_code, 0, "Checking no pipe symbol in output" ); +is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)'", "Output correct" ); + -- cgit v1.2.3