tracks/perl6/exercises/robot-name/robot-name.t in trackler-2.2.1.43 vs tracks/perl6/exercises/robot-name/robot-name.t in trackler-2.2.1.44
- old
+ new
@@ -1,13 +1,13 @@
#!/usr/bin/env perl6
use v6;
use Test;
use lib $?FILE.IO.dirname;
-my $exercise = 'Robot';
-my $version = v1;
-my $module = %*ENV<EXERCISM> ?? 'Example' !! $exercise;
+my Str:D $exercise := 'Robot';
+my Version:D $version = v1;
+my Str $module //= $exercise;
plan 8;
use-ok $module or bail-out;
require ::($module);
@@ -46,5 +46,11 @@
isnt @names, @names.sort, 'Names not ordered';
isnt @names, @names.sort.reverse, 'Names not reverse ordered';
}
done-testing;
+
+INIT {
+ if %*ENV<EXERCISM> {
+ $module = 'Example';
+ }
+}