close( $json );
eval { JSON->VERSION( 2 ) };
- my $suite = $@ ? JSON::jsonToObj( $data ) : JSON::from_json( $data );
- my %variables = %{ $suite->{ variables } };
+ my $suite = $@ ? JSON::jsonToObj( $data ) : JSON::from_json( $data );
+ my $variables = $suite->{variables};
my $count = 0;
- for my $test ( @{ $suite->{ tests } } ) {
- my $template = URI::Template->new( $test->{ template } );
- my $result = $template->process( %variables );
+ for my $test (@{ $suite->{tests} }) {
+ my $template = URI::Template->new( $test->{template} );
+ my $result = $template->process( $variables );
$count++;
- is( $result, $test->{ expected }, "${file}#${count}" );
+ is( $result, $test->{expected}, "${file} test ${count}" );
}
}