Permalink
Browse files

[t] Hi, this is your son's school. We're having some computer trouble.

  • Loading branch information...
1 parent c4f91e1 commit 251b9bfed38cc229002e9035a781f4ff92c66de0 @moritz moritz committed May 4, 2012
Showing with 19 additions and 1 deletion.
  1. +19 −1 t/99-common.pl6
View
20 t/99-common.pl6
@@ -5,7 +5,7 @@
#use Test; # "use" dies in a runtime eval
#use DBIish;
diag "Testing MiniDBD::$*mdriver";
-plan 35;
+plan 38;
sub magic_cmp(@a, @b) {
my $res = @a[0] eq @b[0]
@@ -174,6 +174,24 @@ if 'fetchrow_arrayref' eq any ($sth.^methods) {
}
$sth.finish;
+# test quotes and so on
+{
+ $sth = $dbh.prepare(q[INSERT INTO nom (name, description) VALUES (?, ?)]);
+ my $lived;
+ lives_ok { $sth.execute("quot", q["';]); $lived = 1 }, 'can insert single and double quotes';
+ $sth.finish;
+ if $lived {
+ $sth = $dbh.prepare(q[SELECT description FROM nom where name = ?]);
+ lives_ok { $sth.execute('quot') }, 'lived while retrieving result';
+ is $sth.fetchrow.join, q["';], 'got the right string back';
+ $sth.finish;
+ }
+ else {
+ skip('dependent tests', 2);
+ }
+}
+
+
# Drop the table when finished, and disconnect
ok $dbh.do("DROP TABLE nom"), "final cleanup";
if $dbh.can('ping') {

0 comments on commit 251b9bf

Please sign in to comment.