Skip to content

Commit 2cef80a

Browse files
authored
Merge pull request #302 from skids/rt130528
Tests for matters surrounding RT#130528
2 parents b854dfd + 03c04c7 commit 2cef80a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

S32-exceptions/misc.t

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use lib "t/spec/packages";
55
use Test;
66
use Test::Util;
77

8-
plan 427;
8+
plan 431;
99

1010
throws-like '42 +', Exception, "missing rhs of infix", message => rx/term/;
1111

@@ -572,6 +572,22 @@ throws-like '/m ** 1..-1/', X::Comp::Group,
572572
panic => { .payload ~~ m!'Unable to parse regex; couldn\'t find final \'/\''! },
573573
sorrows => { .[0] => { $_ ~~ X::Syntax::Regex::MalformedRange } and .[1] => { $_ ~~ X::Syntax::Regex::UnrecognizedMetachar } };
574574

575+
# RT #130528 Obey S05 explicit error syntax despite injection of stopper
576+
throws-like 'multi sub postcircumfix:«⟨ ⟩»($foo, $a) { $a.say }; my $a; $a⟨5;', X::Comp::FailGoal,
577+
dba => "postcircumfix:sym<⟨ ⟩>",
578+
goal => "'⟩'";
579+
throws-like 'multi sub circumfix:«⟨ ⟩»($foo, $a) { $a.say }; ⟨5;', X::Comp::FailGoal,
580+
dba => "circumfix:sym<⟨ ⟩>",
581+
goal => "'⟩'";
582+
throws-like '„foo', X::Comp::FailGoal,
583+
dba => "low curly double quotes",
584+
goal => "<[”“]>"; # While this may shackle us to an implementation detail,
585+
# We need a test that ensures the '' normally comes from
586+
# the rx code, except maybe in the above finagle cases.
587+
throws-like '[1,2', X::Comp::FailGoal,
588+
dba => "array composer",
589+
goal => "']'"; # Normal literal-in-regex case.
590+
575591
# RT #122502
576592
throws-like '/m ** 1 ..2/', X::Syntax::Regex::SpacesInBareRange,
577593
pre => { m!'/m ** 1 ..'! },

0 commit comments

Comments
 (0)