X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=t%2F12-suite.t;h=1acb5b5cadd857cb5aaafc089af190e5af3bc430;hp=c95931e8159b46ec2b0b87d73a2f283668daf6cf;hb=c4fd5064ccd0e0c568bec68ebe82f3daf6c235b6;hpb=917525490f5d8e583f4b53dcd2d792b9e6f42c88 diff --git a/t/12-suite.t b/t/12-suite.t index c95931e..1acb5b5 100644 --- a/t/12-suite.t +++ b/t/12-suite.t @@ -18,15 +18,15 @@ for my $file ( @files ) { 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}" ); } }