Skip to content

Commit

Permalink
I'm sick with the YAML implementations in Perl, switching to YAML::XS…
Browse files Browse the repository at this point in the history
… causes difference in dumps and thus spectest failures, switching to JSON
  • Loading branch information
sharyanto committed Feb 2, 2013
1 parent 0845b57 commit 5c4121f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions devscripts/gen-type-spectest
Expand Up @@ -7,9 +7,11 @@ use FindBin '$Bin';

use vars qw($VERSION);
use Data::Clone;
use File::Slurp;
use YAML::XS qw(Dump);
use Data::Dump::OneLine qw(dump1);
use File::Slurp;
use JSON;

my $json = JSON->new->allow_nonref->pretty(1);

# VERSION
unless (defined $VERSION) {
Expand Down Expand Up @@ -1435,8 +1437,8 @@ sub gen_all_tests {
my $f = "gen_${type}_tests";
no strict 'refs';
write_file(
"$Bin/../share/spectest/10-type-$type.yaml",
Dump({version => $v, tests => [$f->()]}),
"$Bin/../share/spectest/10-type-$type.json",
$json->encode({version => $v, tests => [$f->()]}),
);
}
}
3 changes: 2 additions & 1 deletion dist.ini
Expand Up @@ -24,4 +24,5 @@ DefHash=1.0.1
;Data::Clone=0
Data::Dump::OneLine=0
File::Slurp=0
YAML::XS=0
;YAML::XS=0
JSON=0

0 comments on commit 5c4121f

Please sign in to comment.