Skip to content

Commit

Permalink
Merge pull request #1706 from ronaldxs/rakudo-t-RT-132238-match-hash-2
Browse files Browse the repository at this point in the history
Update 05-messages/03-errors.t test for RT #132238
  • Loading branch information
zoffixznet committed Apr 8, 2018
2 parents edbbc44 + 27e77c8 commit 9ff6556
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion t/05-messages/03-errors.t
Expand Up @@ -2,7 +2,7 @@ use lib <t/packages/>;
use Test;
use Test::Helpers;

plan 9;
plan 10;

subtest '.map does not explode in optimizer' => {
plan 3;
Expand Down Expand Up @@ -74,4 +74,20 @@ throws-like {
}, Exception, :message{.contains: 'handle not open'},
'trying to bind Proc::Async to unopened handle gives useful error';

# RT #132238
subtest 'unclosed hash quote index operator <> message' => {
plan 2;
throws-like "\n\nsay \$<\n\n", X::Comp::AdHoc,
'good error message for unclosed <> hash operator',
message => /:i[:s unable to parse<|w>]
.* <|w>find\s+\'\>\'
.* [:s at line 3]
/;
todo 'RT #132238 - remove "expecting any of:"';
throws-like "say \$<", X::Comp::AdHoc,
'better and shorter error message for unclosed <> hash operator',
# somewhat tricky does not contain "expecting any of"
gist => /^ [. <!before [:s expecting any of:]>]* $ /;
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 9ff6556

Please sign in to comment.