From: Greg Sabino Mullane Date: Fri, 18 Feb 2011 03:05:01 +0000 (-0500) Subject: Fix up custom query test. X-Git-Tag: 2.18.0~74 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=058c4c124d529dd3a4f4966ff6b7d258ede3b28c;p=check_postgres.git Fix up custom query test. --- diff --git a/t/02_custom_query.t b/t/02_custom_query.t index ac30c4d28..791a0dee3 100644 --- a/t/02_custom_query.t +++ b/t/02_custom_query.t @@ -6,7 +6,7 @@ use 5.006; use strict; use warnings; use Data::Dumper; -use Test::More tests => 11; +use Test::More tests => 12; use lib 't','.'; use CP_Testing; @@ -35,8 +35,12 @@ like ($result, qr{host:$host}, $t); $t = qq{$S fails when called with an invalid option}; like ($cp->run('foobar=12'), qr{^\s*Usage:}, $t); -$t = qq{$S handles 'string' type}; +$t = qq{$S handles 'string' type for non-match}; like ($cp->run(qq{--query="$good_query" --valtype=string --warning=abc}), + qr{$label OK}, $t); + +$t = qq{$S handles 'string' type for match}; +like ($cp->run(qq{--query="SELECT 'abc' AS result" --valtype=string --warning=abc}), qr{$label WARNING}, $t); $t = qq{$S handles 'time' type};