Sha256: 57193dc4c8b8b11083eefc11d13bbd1b80a1ce5bf5f3aad2931af31d328c3060

Contents?: true

Size: 1.2 KB

Versions: 48

Compression:

Stored size: 1.2 KB

Contents

#!/usr/bin/env perl
use strict;
use warnings;{{#cdata}}
use JSON::PP;{{/cdata}}
use FindBin;
use lib $FindBin::Bin;{{#lib_comment}} {{&lib_comment}}{{/lib_comment}}
use {{&exercise}} {{#subs}}qw{{/subs}}({{&subs}});{{#modules}}
use {{&use}};{{/modules}}

my $exercise{{#exercise}} = '{{&exercise}}'{{/exercise}};{{#exercise_comment}} {{&exercise_comment}}{{/exercise_comment}}
my $test_version{{#version}} = {{&version}}{{/version}};{{#version_comment}} {{&version_comment}}{{/version_comment}}
use Test::More{{#plan}} tests => {{&plan}}{{/plan}};{{#plan_comment}} {{&plan_comment}}{{/plan_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. "
    . "Test is v$test_version.\n";
  BAIL_OUT if $ENV{EXERCISM};
}
{{#subs}}

can_ok $exercise, 'import' or BAIL_OUT 'Cannot import subroutines from module';{{/subs}}{{#methods}}
can_ok $exercise, qw({{&methods}});{{/methods}}{{#cdata}}

my $C_DATA = do { local $/; decode_json(<DATA>); };{{/cdata}}
{{&tests}}
{{#cdata}}

__DATA__
{{&json}}
{{/cdata}}

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/perl5/templates/test.mustache
trackler-2.2.1.179 tracks/perl5/templates/test.mustache
trackler-2.2.1.178 tracks/perl5/templates/test.mustache
trackler-2.2.1.177 tracks/perl5/templates/test.mustache
trackler-2.2.1.176 tracks/perl5/templates/test.mustache
trackler-2.2.1.175 tracks/perl5/templates/test.mustache
trackler-2.2.1.174 tracks/perl5/templates/test.mustache
trackler-2.2.1.173 tracks/perl5/templates/test.mustache
trackler-2.2.1.172 tracks/perl5/templates/test.mustache
trackler-2.2.1.171 tracks/perl5/templates/test.mustache
trackler-2.2.1.170 tracks/perl5/templates/test.mustache
trackler-2.2.1.169 tracks/perl5/templates/test.mustache
trackler-2.2.1.167 tracks/perl5/templates/test.mustache
trackler-2.2.1.166 tracks/perl5/templates/test.mustache
trackler-2.2.1.165 tracks/perl5/templates/test.mustache
trackler-2.2.1.164 tracks/perl5/templates/test.mustache
trackler-2.2.1.163 tracks/perl5/templates/test.mustache
trackler-2.2.1.162 tracks/perl5/templates/test.mustache
trackler-2.2.1.161 tracks/perl5/templates/test.mustache
trackler-2.2.1.160 tracks/perl5/templates/test.mustache