summaryrefslogtreecommitdiff
path: root/t/rt_64177_ping_wipes_out_the_errstr.t
diff options
context:
space:
mode:
Diffstat (limited to 't/rt_64177_ping_wipes_out_the_errstr.t')
-rw-r--r--t/rt_64177_ping_wipes_out_the_errstr.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/rt_64177_ping_wipes_out_the_errstr.t b/t/rt_64177_ping_wipes_out_the_errstr.t
new file mode 100644
index 0000000..db63363
--- /dev/null
+++ b/t/rt_64177_ping_wipes_out_the_errstr.t
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+use strict;
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+
+use t::lib::Test;
+use Test::More tests => 8;
+use Test::NoWarnings;
+
+my $dbh = connect_ok(RaiseError => 1, PrintError => 0);
+eval { $dbh->do('foobar') };
+ok $@, "raised error";
+ok $dbh->err, "has err";
+ok $dbh->errstr, "has errstr";
+ok $dbh->ping, "ping succeeded";
+ok $dbh->err, "err is not wiped out";
+ok $dbh->errstr, "errstr is not wiped out";