diff --git a/t/47postgres-utf8.t b/t/47postgres-utf8.t new file mode 100644 index 00000000..e51ba995 --- /dev/null +++ b/t/47postgres-utf8.t @@ -0,0 +1,30 @@ +use utf8; +use strict; +use warnings; + +use Test::More; +use SQL::Translator; + + +# Create a new translator object +my $translator = SQL::Translator->new( + from => 'PostgreSQL', + to => 'PostgreSQL', + quote_identifiers => 0, +); + +# Input PostgreSQL schema as a string (you can also use a file) +my $ddl = <translate( \$ddl ) + or die "Translation failed: " . $translator->error; + +$ddl =~ s/\s//sg; +$out =~ s/^--.*|\s//mg; + +is $out, $ddl, "UTF is not broken"; + +done_testing();