Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[spec] tests for interpolated sequential alternations ( ||@list )

git-svn-id: http://svn.pugscode.org/pugs@20892 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 3a1ce4c29e69ff30d9d11f79521018993ac8c124 1 parent 002a3d4
authored

Showing 1 changed file with 16 additions and 1 deletion. Show diff stats Hide diff stats

  1. 17  S05-alternation/sequential.t
17  S05-alternation/sequential.t
... ...
@@ -1,6 +1,6 @@
1 1
 use v6;
2 2
 use Test;
3  
-plan 6;
  3
+plan 10;
4 4
 
5 5
 #L<S05/New metacharacters/"As with the disjunctions | and ||">
6 6
 
@@ -18,3 +18,18 @@ plan 6;
18 18
     ok $str ~~ m/xxxx||xx||x/;
19 19
     is ~$/, 'xx', 'second alternative || matches if first fails';
20 20
 }
  21
+
  22
+#L<S05/"Variable (non-)interpolation"/"An interpolated array:">
  23
+
  24
+{
  25
+    my $str = 'x' x 7;
  26
+    my @list = <x xx xxxx>;
  27
+
  28
+    ok $str ~~ m/ ||@list /;
  29
+    is ~$/,  'x',  'first ||@list alternative matches';
  30
+
  31
+    @list = <xx x xxxx>;
  32
+
  33
+    ok $str ~~ m/ ||@list /;
  34
+    is ~$/,  'xx', 'first ||@list alternative matches';
  35
+}

0 notes on commit 3a1ce4c

Please sign in to comment.
Something went wrong with that request. Please try again.