* Fix missing semicolons between PostGIS statements
* Fix string and identifier quoting in PostGIS statements
* Fix intermittent test failures (RT#108460)
+ * Fix relying on exact serialisation for JSON/YAML tests (RT#121901)
0.11021 2015-01-29
use warnings;
use strict;
use Test::More;
-use Test::Differences;
+use Test::Exception;
use Test::SQL::Translator qw(maybe_plan);
use SQL::Translator;
use FindBin '$Bin';
my $sqlt_version = $SQL::Translator::VERSION;
use JSON;
-my $json = to_json(from_json(<<JSON), { canonical => 1, pretty => 1 });
+my $json = from_json(<<JSON);
{
"schema" : {
"procedures" : {},
);
my $out;
-ok( $out = $tr->translate, 'Translate SQLite to JSON' );
-eq_or_diff( $out, $json, 'JSON matches expected' );
+lives_ok { $out = from_json($tr->translate) } 'Translate SQLite to JSON';
+is_deeply( $out, $json, 'JSON matches expected' );
use warnings;
use strict;
use Test::More;
-use Test::Differences;
+use Test::Exception;
use Test::SQL::Translator qw(maybe_plan);
use SQL::Translator;
use FindBin '$Bin';
}
my $sqlt_version = $SQL::Translator::VERSION;
-use YAML qw(Dump Load);
-my $yaml = Dump(Load(<<YAML));
+use YAML qw(Load);
+my $yaml = Load(<<YAML);
---
schema:
procedures: {}
);
my $out;
-ok( $out = $tr->translate, 'Translate SQLite to YAML' );
-eq_or_diff( $out, $yaml, 'YAML matches expected' );
+lives_ok { $out = Load($tr->translate) } 'Translate SQLite to YAML';
+is_deeply( $out, $yaml, 'YAML matches expected' );