@@ -5,7 +5,7 @@ use lib "t/spec/packages";
5
5
use Test ;
6
6
use Test ::Util;
7
7
8
- plan 427 ;
8
+ plan 431 ;
9
9
10
10
throws-like ' 42 +' , Exception , " missing rhs of infix" , message => rx /term /;
11
11
@@ -572,6 +572,22 @@ throws-like '/m ** 1..-1/', X::Comp::Group,
572
572
panic => { . payload ~~ m !'Unable to parse regex; couldn\'t find final \'/\'' ! },
573
573
sorrows => { . [0 ] => { $ _ ~~ X::Syntax::Regex::MalformedRange } and . [1 ] => { $ _ ~~ X::Syntax::Regex::UnrecognizedMetachar } };
574
574
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
+
575
591
# RT #122502
576
592
throws-like ' /m ** 1 ..2/' , X::Syntax::Regex::SpacesInBareRange ,
577
593
pre => { m !'/m ** 1 ..' ! },
0 commit comments