[Jifty-commit] r7056 - Jifty-DBI/trunk/t
Jifty commits
jifty-commit at lists.jifty.org
Tue May 19 08:22:14 EDT 2009
Author: sartak
Date: Tue May 19 08:22:14 2009
New Revision: 7056
Modified:
Jifty-DBI/trunk/t/03rename_table.t
Log:
Test more intentional warnings
Modified: Jifty-DBI/trunk/t/03rename_table.t
==============================================================================
--- Jifty-DBI/trunk/t/03rename_table.t (original)
+++ Jifty-DBI/trunk/t/03rename_table.t Tue May 19 08:22:14 2009
@@ -10,7 +10,7 @@
BEGIN { require "t/utils.pl" }
our (@available_drivers);
-use constant TESTS_PER_DRIVER => 6;
+use constant TESTS_PER_DRIVER => 7;
my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
plan tests => $total;
@@ -41,8 +41,12 @@
is $handle->simple_query("select * from test1")->fetchrow_hashref->{'a'},
1, 'correct value';
- ok !eval { $handle->simple_query("select * from test") },
- "no test table anymore";
+ my @warnings;
+ ok !eval {
+ local $SIG{__WARN__} = sub { push @warnings, @_ };
+ $handle->simple_query("select * from test")
+ }, "no test table anymore";
+ ok(@warnings, "got some warnings");
}} # SKIP, foreach blocks
More information about the Jifty-commit
mailing list