tracks/perl5/templates/test.mustache in trackler-2.2.1.104 vs tracks/perl5/templates/test.mustache in trackler-2.2.1.105

- old
+ new

@@ -12,11 +12,10 @@ my $module = $ENV{EXERCISM} ? 'Example' : $exercise;{{#module_comment}} {{&module_comment}}{{/module_comment}} use Test::More{{#plan}} tests => {{&plan}}{{/plan}};{{#plan_comment}} {{&plan_comment}}{{/plan_comment}} use_ok $module or BAIL_OUT;{{#use_test_comment}} {{&use_test_comment}}{{/use_test_comment}} {{#version_test_comment}} - {{&version_test_comment}}{{/version_test_comment}} my $exercise_version = $exercise->VERSION // 0; if ($exercise_version != $test_version) { warn "\nExercise version mismatch. Further tests may fail!" . "\n$exercise is v$exercise_version. " @@ -29,30 +28,23 @@ foreach ( qw({{&subs}}) ) { can_ok $exercise, $_; $subs{$_} = $exercise->can($_); } {{/subs}}{{#cdata}} -my $C_DATA;{{/cdata}} +my $C_DATA = do { local $/; decode_json(<DATA>); };{{/cdata}} {{&tests}} {{#cdata}}{{#cdata_test_comment}} {{&cdata_test_comment}}{{/cdata_test_comment}} SKIP: { skip '', 1 unless $ENV{EXERCISM}; - is_deeply eval q{ - use Path::Tiny; - decode_json path("$dir/../../problem-specifications/exercises/".path($dir)->basename.'/canonical-data.json')->realpath->slurp; - }, $C_DATA, 'canonical-data'; + TODO: { + local $TODO = 'update canonical-data'; + is_deeply eval q{ + use Path::Tiny; + decode_json path("$dir/../../problem-specifications/exercises/".path($dir)->basename.'/canonical-data.json')->realpath->slurp; + }, $C_DATA, 'canonical-data'; + } } -{{/cdata}} -done_testing;{{#done_testing_comment}} {{&done_testing_comment}}{{/done_testing_comment}}{{#after_done_testing}} - -{{&after_done_testing}}{{/after_done_testing}}{{#cdata}} -{{#INIT_comment}} - -{{&INIT_comment}}{{/INIT_comment}} -INIT { -$C_DATA = decode_json <<'EOF'; - +__DATA__ {{&json}} -EOF -}{{/cdata}} +{{/cdata}}