summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-02-18 03:05:01 +0000
committerGreg Sabino Mullane2011-02-18 03:05:01 +0000
commit058c4c124d529dd3a4f4966ff6b7d258ede3b28c (patch)
tree2ba6781e2dd946a0b3ce144b2bc500dcf26f4d4e
parentef446d0dff287891167e8d2592c95cba5bafa322 (diff)
Fix up custom query test.
-rw-r--r--t/02_custom_query.t8
1 files changed, 6 insertions, 2 deletions
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};