Fix up custom query test.
authorGreg Sabino Mullane <[email protected]>
Fri, 18 Feb 2011 03:05:01 +0000 (22:05 -0500)
committerGreg Sabino Mullane <[email protected]>
Fri, 18 Feb 2011 03:05:01 +0000 (22:05 -0500)
t/02_custom_query.t

index ac30c4d286431ed7a231fdf027aecf4baf1fee99..791a0dee35d5db747c199b1a89524fc2b8bd3c26 100644 (file)
@@ -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};