File: 50_odbc_utf8_on.t

package info (click to toggle)
libdbd-odbc-perl 1.37-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,272 kB
  • sloc: perl: 7,932; ansic: 5,991; makefile: 33; sql: 8
file content (29 lines) | stat: -rw-r--r-- 627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl -w -I./t
# $Id: 50_odbc_utf8_on.t 13487 2009-11-12 09:49:38Z mjevans $

use Test::More;
use strict;

$| = 1;

plan tests => 3;

use DBI;
my $dbh;

BEGIN {
	plan skip_all => "DBI_DSN is undefined" unless($ENV{DBI_DSN});
}


$dbh = DBI->connect();
unless($dbh) {
   BAIL_OUT("Unable to connect to the database $DBI::errstr\nTests skipped.\n");
   exit 0;
}

ok(exists($dbh->{odbc_utf8_on}), "odbc_utf8_on exists with value=$dbh->{odbc_utf8_on}");
is($dbh->{odbc_utf8_on}, 0, "odbc_utf8_on is off by default");

$dbh->{odbc_utf8_on} = 1;
is($dbh->{odbc_utf8_on}, 1, "odbc_utf8_on set value=$dbh->{odbc_utf8_on}");