Sha256: 9cc188f11f54ff281f25870437d5b7aca610acb1585cb9f47c8d925967ce632c

Contents?: true

Size: 1.03 KB

Versions: 78

Compression:

Stored size: 1.03 KB

Contents

#!/usr/bin/env perl6
use v6;
use Test;
use JSON::Fast;
use lib $?FILE.IO.dirname; #`[Look for the module inside the same directory as this test file.]
use HelloWorld;
plan 1; #`[This is how many tests we expect to run.]

my Version:D $version = v3; #`[The version we will be matching against the exercise.]

#`[If the exercise is updated, we want to make sure other people testing
your code don't think you've made a mistake if things have changed!]
if HelloWorld.^ver !~~ $version {
  warn "\nExercise version mismatch. Further tests may fail!"
    ~ "\nHelloWorld is {HelloWorld.^ver.gist}. "
    ~ "Test is {$version.gist}.\n";
}

my $c-data = from-json $=pod.pop.contents;
# Go through the cases and check that &hello gives us the correct response.
is hello, |.<expected description> for @($c-data<cases>);

=head2 Canonical Data
=begin code
{
  "exercise": "hello-world",
  "version": "1.1.0",
  "cases": [
    {
      "description": "Say Hi!",
      "property": "hello",
      "input": {},
      "expected": "Hello, World!"
    }
  ]
}
=end code

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.179 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.178 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.177 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.176 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.175 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.174 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.173 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.172 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.171 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.170 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.169 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.167 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.166 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.165 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.164 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.163 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.162 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.161 tracks/perl6/exercises/hello-world/hello-world.t
trackler-2.2.1.160 tracks/perl6/exercises/hello-world/hello-world.t