summaryrefslogtreecommitdiff
path: root/t/30_auto_rollback.t
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2012-09-24 10:15:50 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-09-26 13:46:46 +0000
commit485b97be9f2f2abf5a40923b5fd85f75714a8c02 (patch)
treeca05cb0ecf3828d909a898c3e5805804a0aff5f8 /t/30_auto_rollback.t
downloadperl-dbd-sqlite-tarball-485b97be9f2f2abf5a40923b5fd85f75714a8c02.tar.gz
Imported from /srv/lorry/lorry-area/perl-dbd-sqlite-tarball/DBD-SQLite-1.38_01.tar.gz.HEADDBD-SQLite-1.38_01masterbaserock/morph
Diffstat (limited to 't/30_auto_rollback.t')
-rw-r--r--t/30_auto_rollback.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/30_auto_rollback.t b/t/30_auto_rollback.t
new file mode 100644
index 0000000..7a23760
--- /dev/null
+++ b/t/30_auto_rollback.t
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+# I've disabled warnings, so theoretically warnings shouldn't be printed
+
+use strict;
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+
+use t::lib::Test;
+use Test::More tests => 6;
+use Test::NoWarnings;
+
+SCOPE: {
+ my $dbh = connect_ok( RaiseError => 1, PrintWarn => 0, Warn => 0 );
+ ok( ! $dbh->{PrintWarn}, '->{PrintWarn} is false' );
+ ok( $dbh->do("CREATE TABLE f (f1, f2, f3)"), 'CREATE TABLE ok' );
+ ok( $dbh->begin_work, '->begin_work' );
+ ok(
+ $dbh->do("INSERT INTO f VALUES (?, ?, ?)", {}, 'foo', 'bar', 1),
+ 'INSERT ok',
+ );
+}