File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Changes for SQL::Translator
23
23
* Fix missing semicolons between PostGIS statements
24
24
* Fix string and identifier quoting in PostGIS statements
25
25
* Fix intermittent test failures (RT#108460)
26
+ * Fix relying on exact serialisation for JSON/YAML tests (RT#121901)
26
27
27
28
0.11021 2015-01-29
28
29
Original file line number Diff line number Diff line change 1
1
use warnings;
2
2
use strict;
3
3
use Test::More;
4
- use Test::Differences ;
4
+ use Test::Exception ;
5
5
use Test::SQL::Translator qw( maybe_plan) ;
6
6
use SQL::Translator;
7
7
use FindBin ' $Bin' ;
@@ -16,7 +16,7 @@ BEGIN {
16
16
17
17
my $sqlt_version = $SQL::Translator::VERSION ;
18
18
use JSON;
19
- my $json = to_json( from_json(<<JSON ), { canonical => 1, pretty => 1 } );
19
+ my $json = from_json(<<JSON );
20
20
{
21
21
"schema" : {
22
22
"procedures" : {},
@@ -306,5 +306,5 @@ my $tr = SQL::Translator->new(
306
306
);
307
307
308
308
my $out ;
309
- ok( $out = $tr -> translate, ' Translate SQLite to JSON' ) ;
310
- eq_or_diff ( $out , $json , ' JSON matches expected' );
309
+ lives_ok { $out = from_json( $tr -> translate) } ' Translate SQLite to JSON' ;
310
+ is_deeply ( $out , $json , ' JSON matches expected' );
Original file line number Diff line number Diff line change 1
1
use warnings;
2
2
use strict;
3
3
use Test::More;
4
- use Test::Differences ;
4
+ use Test::Exception ;
5
5
use Test::SQL::Translator qw( maybe_plan) ;
6
6
use SQL::Translator;
7
7
use FindBin ' $Bin' ;
@@ -13,8 +13,8 @@ BEGIN {
13
13
}
14
14
15
15
my $sqlt_version = $SQL::Translator::VERSION ;
16
- use YAML qw( Dump Load) ;
17
- my $yaml = Dump( Load(<<YAML ) );
16
+ use YAML qw( Load) ;
17
+ my $yaml = Load(<<YAML );
18
18
---
19
19
schema:
20
20
procedures: {}
@@ -247,5 +247,5 @@ my $tr = SQL::Translator->new(
247
247
);
248
248
249
249
my $out ;
250
- ok( $out = $tr -> translate, ' Translate SQLite to YAML' ) ;
251
- eq_or_diff ( $out , $yaml , ' YAML matches expected' );
250
+ lives_ok { $out = Load( $tr -> translate) } ' Translate SQLite to YAML' ;
251
+ is_deeply ( $out , $yaml , ' YAML matches expected' );
You can’t perform that action at this time.
0 commit comments