diff --git a/t/05-messages/03-errors.t b/t/05-messages/03-errors.t index 525b8925151..5ca5a22ddfe 100644 --- a/t/05-messages/03-errors.t +++ b/t/05-messages/03-errors.t @@ -2,7 +2,7 @@ use lib ; use Test; use Test::Helpers; -plan 9; +plan 10; subtest '.map does not explode in optimizer' => { plan 3; @@ -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 => /^ [. ]* $ /; +} + # vim: ft=perl6 expandtab sw=4