From 39e0ee3dcd831ddd3a7777fe55e6788825babac7 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Wed, 5 Apr 2006 07:58:29 +0000 Subject: Allow multiple -k parameters (Gerd Mueller - 1457726) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1367 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/t/check_http.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins/t/check_http.t') diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 408906d9..3154151f 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -9,7 +9,7 @@ use strict; use Test::More; use NPTest; -plan tests => 12; +plan tests => 14; my $successOutput = '/OK.*HTTP.*second/'; @@ -33,6 +33,16 @@ $res = NPTest->testCmd( cmp_ok( $res->return_code, '==', 0, "Webserver $host_tcp_http responded" ); like( $res->output, $successOutput, "Output OK" ); +$res = NPTest->testCmd( + "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here'" + ); +like( $res->output, '/bob:there\r\nfred:here\r\n/', "Got headers, delimited with ';'" ); + +$res = NPTest->testCmd( + "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here' -k 'carl:frown'" + ); +like( $res->output, '/bob:there\r\nfred:here\r\ncarl:frown\r\n/', "Got headers with multiple -k options" ); + $res = NPTest->testCmd( "./check_http $host_nonresponsive -wt 1 -ct 2" ); -- cgit v1.2.3