Skip to content

Commit

Permalink
Change tests with 'like' to use description
Browse files Browse the repository at this point in the history
(the tests died with a NPE on JVM before, which is a known bug)
  • Loading branch information
usev6 committed Nov 18, 2015
1 parent b2f0f93 commit 7e9a101
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integration/advent2012-day10.t
Expand Up @@ -47,7 +47,7 @@ is q{{Unmatched } and { are { OK } in { here}}, q:to"END".chomp;
Unmatched } and { are { OK } in { here
END

like(qq!Lottery results: {(1..49).roll(6).sort}!, /^'Lottery results:'[' '\d+]**6$/), 'lottery results';
like(qq!Lottery results: {(1..49).roll(6).sort}!, /^'Lottery results:'[' '\d+]**6$/, 'lottery results');

my $pub-with-no-beer = q<Once upon a time, there was a pub. The pub had
lots of awesome beer. One day, a Perl workshop
Expand Down Expand Up @@ -97,14 +97,14 @@ Found vacation
Didn't find whisky
END RESULTS
like(qq:!s"It costs $10 to {<eat nom>.pick} here.", /^'It costs $10 to '[eat|nom]' here.'$/), 'quoting features';
like(qq:!s"It costs $10 to {<eat nom>.pick} here.", /^'It costs $10 to '[eat|nom]' here.'$/, 'quoting features');

is Q{$*DISTRO.name\n&sin(3)}, q:to"END".chomp;
$*DISTRO.name\n&sin(3)
END
like(Q:s{$*DISTRO.name\n&sin(3)}, /\w+ .*? '\n&sin(3)'/), 'Q:s(...)';
like(Q:s{$*DISTRO.name\n&sin(3)}, /\w+ .*? '\n&sin(3)'/, 'Q:s(...)');

like(Q:s:b{$*DISTRO.name\n&sin(3)}, /\w+ .*? \n '&sin(3)'/), 'Q:s:b(...)';
like(Q:s:b{$*DISTRO.name\n&sin(3)}, /\w+ .*? \n '&sin(3)'/, 'Q:s:b(...)');

like(Q:s:b:f{$*DISTRO.name\n&sin(3)}, /\w+ .*? \n '0.14112'\d+$/), 'Q:s:b:f(...)';
like(Q:s:b:f{$*DISTRO.name\n&sin(3)}, /\w+ .*? \n '0.14112'\d+$/, 'Q:s:b:f(...)');

0 comments on commit 7e9a101

Please sign in to comment.