Skip to content

Commit

Permalink
Use a Bool
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Jan 28, 2017
1 parent f4067d8 commit 8e0cb3e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/DBIish/CommonTesting.pm6
Expand Up @@ -321,8 +321,8 @@ method run-tests {
# 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';
my Bool $lived = False;
lives-ok { $sth.execute("quot", q["';]); $lived = True }, 'can insert single and double quotes';
$sth.dispose;
if $lived {
$sth = $dbh.prepare(q[SELECT description FROM nom WHERE name = ?]);
Expand All @@ -334,9 +334,10 @@ method run-tests {
skip('dependent tests', 2);
}

$lived = 0;
$lived = False;
lives-ok {
$dbh.do(q[INSERT INTO nom (name, description) VALUES(?, '?"')], 'mark'); $lived = 1
$dbh.do(q[INSERT INTO nom (name, description) VALUES(?, '?"')], 'mark');
$lived = True
}, 'can use question mark in quoted strings';
if $lived {
my $sth = $dbh.prepare(q[SELECT description FROM nom WHERE name = 'mark']);
Expand Down

0 comments on commit 8e0cb3e

Please sign in to comment.