Committed by Greg Sabino Mullane <[email protected]>

Put a skeleton utf8 test place.

---
 MANIFEST      |    1 +
 README.dev    |    2 ++
 t/30unicode.t |   29 +++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/MANIFEST b/MANIFEST
index a056945..024fbda 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -41,6 +41,7 @@ t/08async.t
 t/09arrays.t
 t/12placeholders.t
 t/20savepoints.t
+t/30unicode.t
 t/99cleanup.t
 
 t/lib/App/Info.pm
diff --git a/README.dev b/README.dev
index e78b40a..fcc8b84 100644
--- a/README.dev
+++ b/README.dev
@@ -175,6 +175,8 @@ t/12placeholders.t - Tests placeholders.
 
 t/20savepoints.t - Test savepoints. Requires a server version 8.0 or up.
 
+t/30unicode.t - Test Unicode. Or at least UTF8.
+
 t/99cleanup.t - Removes anything we have created for the tests (e.g. tables)
 
 t/99_perlcritic.t - Uses Perl::Critic to check Pg.pm and all of the test files.
diff --git a/t/30unicode.t b/t/30unicode.t
new file mode 100644
index 0000000..650e410
--- /dev/null
+++ b/t/30unicode.t
@@ -0,0 +1,29 @@
+#!perl
+
+## Test everything related to Unicode.
+## At the moment, this basically means testing the UTF8 client_encoding
+## and $dbh->{pg_enable_utf8} bits
+
+use 5.006;
+use strict;
+use warnings;
+use Test::More;
+use lib 't','.';
+require 'dbdpg_test_setup.pl';
+select(($|=1,select(STDERR),$|=1)[1]);
+
+my $dbh = connect_database();
+
+if (! $dbh) {
+       plan skip_all => 'Connection to database failed, cannot continue 
testing';
+}
+plan tests => 1;
+
+isnt ($dbh, undef, 'Connect to database for unicode testing');
+
+my $pgversion = $dbh->{pg_server_version};
+
+my $t;
+
+cleanup_database($dbh,'test');
+$dbh->disconnect();
-- 
1.7.1

Reply via email to