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

« back to all changes in this revision

Viewing changes to t/06bytea.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:
46
46
 
47
47
my $string = "abc\123\\def\0ghi";
48
48
my $result = $dbh->quote($string, { pg_type => PG_BYTEA });
49
 
my $expected = qq{'abc\123\\\\\\\\def\\\\000ghi'};
 
49
my $E = $pgversion >= 80100 ? q{E} : q{};
 
50
my $expected = qq{${E}'abc\123\\\\\\\\def\\\\000ghi'};
50
51
is( $result, $expected, 'quote properly handles bytea strings.');
51
52
 
52
53
$sth->finish();