Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] Tests for RT #64952

git-svn-id: http://svn.pugscode.org/pugs@27972 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit c96e63b8c4612d439ada51b39143e70dcde24fa9 1 parent 54585e3
kyle authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 S05-match/capturing-contexts.t
14 S05-match/capturing-contexts.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 20;
+plan 24;
if !eval('("a" ~~ /a/)') {
skip_rest "skipped tests - rules support appears to be missing";
@@ -79,4 +79,16 @@ if !eval('("a" ~~ /a/)') {
'"alpha" exists in Match stored in Hash';
}
+# RT #64952
+{
+ 'ab' ~~ /(.)+/;
+ is $/[0][0], 'a', 'match element [0][0] from /(.)+/';
+ is $/[0][1], 'b', 'match element [0][1] from /(.)+/';
+
+ my @match = @( 'ab' ~~ /(.)+/ );
+ #?rakudo 2 todo 'match coerced to array is flattened (RT #64952)'
+ is @match[0][0], 'a', 'match element [0][0] from /(.)+/ coerced';
+ is @match[0][1], 'b', 'match element [0][1] from /(.)+/ coerced';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.