Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 26 lines (20 sloc) 0.623 kB
6415682 Teste le bon fonctionnement des booléens
Éric Cholet authored
1 #!perl -w
2 use Test::More tests => 2;
3 use strict;
4 use t::Util; # load the test database
5
6 $Request{dbh}->do('CREATE TABLE foo ( bar boolean DEFAULT false )');
7 $Request{dbh}->commit;
8
9 for my $v (0..1) {
10 my $sth = $Request{dbh}->prepare('INSERT INTO foo (bar) VALUES (?)');
11 $sth->execute($v);
12 $Request{dbh}->commit;
13
14 $sth = $Request{dbh}->prepare('SELECT bar FROM foo');
15 $sth->execute();
16 my ($bar) = $sth->fetchrow_array;
17 $sth->finish;
18 is($bar, $v);
19
20 $sth = $Request{dbh}->prepare('DELETE FROM foo');
21 $sth->execute();
22 $Request{dbh}->commit;
23 }
24
25 $Request{dbh}->do('DROP TABLE foo');
Something went wrong with that request. Please try again.