Sha256: eab2af4d25054196f694979975cd2535b7590f7d791159e47108c35d14206513

Contents?: true

Size: 593 Bytes

Versions: 57

Compression:

Stored size: 593 Bytes

Contents

#!/usr/bin/env perl6

use Test;
use JSON::Tiny;

use lib ( my $dir = IO::Path.new($?FILE).parent ).path;

my $module_name = %*ENV<EXERCISM>.so ?? 'Example' !! 'SpaceAge';
my @potential_module = <p6 pm6 pm>.map:  $module_name ~ '.' ~ *; 

my $module = first { $dir.child($_).e }, |@potential_module
    or die "No file '$module_name.p6' found\n";

require $module <&age-on>;

plan 8;

my %testcase = from-json $dir.child('cases.json').slurp;

for |%testcase{'age on'}{'cases'} -> %case {
        is age-on( |%case<planet seconds>), %case{'expected'},
             %case<planet seconds>.gist;
}

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
trackler-2.0.6.33 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.32 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.31 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.30 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.29 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.28 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.27 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.26 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.25 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.24 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.23 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.22 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.21 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.20 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.19 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.18 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.17 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.16 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.15 tracks/perl6/exercises/space-age/space-age.t
trackler-2.0.6.14 tracks/perl6/exercises/space-age/space-age.t