~ubuntu-branches/ubuntu/precise/libdbd-pg-perl/precise

« back to all changes in this revision

Viewing changes to t/12placeholders.t

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2008-05-11 14:32:37 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080511143237-knulflfju6qi2s0p
Tags: 2.7.0-1
* New upstream release.
* Refresh lintian override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
}
26
26
 
27
27
# Make sure that quoting works properly.
 
28
my $E = $pgversion >= 80100 ? q{E} : q{};
28
29
$t=q{Quoting works properly};
29
30
my $quo = $dbh->quote('\\\'?:');
30
 
is( $quo, q{'\\\\''?:'}, $t);
 
31
is( $quo, qq{${E}'\\\\''?:'}, $t);
31
32
 
32
33
$t=q{Quoting works with a function call};
33
34
# Make sure that quoting works with a function call.
134
135
my $backslash = $dbh->selectall_arrayref($SQL)->[0][0];
135
136
 
136
137
$t=q{Prepare with backslashes inside quotes works};
137
 
$sth = $dbh->prepare(q{SELECT '\\'?'});
 
138
my $scs = $dbh->{pg_standard_conforming_strings};
 
139
$SQL = $scs ? q{SELECT E'\\'?'} : q{SELECT '\\'?'};
 
140
$sth = $dbh->prepare($SQL);
138
141
eval {
139
142
        $sth->execute();
140
143
};