Skip to content
Browse files

[t/spec] correct one :x test, add another one

git-svn-id: http://svn.pugscode.org/pugs@30687 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 81ffe74 commit 1fcf803741deccf338c722e68f491d05ddbe5f40 moritz committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 S05-modifier/repetition.t
View
5 S05-modifier/repetition.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 11;
+plan 12;
#L<S05/Modifiers/"If followed by an x, it means repetition.">
@@ -20,11 +20,12 @@ nok('ab' ~~ m:x(2)/ab/, ':2x (repetition) modifier (-)');
nok 'abc'.match(rx/ab/, :x(2)), ':x(2) with .match method (-)';
ok 'ababc'.match(rx/./, :x(3)), ':x(3) with .match method (bool)';
- is 'ababc'.match(rx/./, :x(3)).join('|'), 'a|b|c', ':x(3) with .match method (result)';
+ is 'ababc'.match(rx/./, :x(3)).join('|'), 'a|b|a', ':x(3) with .match method (result)';
}
{
ok 'abacad'.match(rx/a./, :x(1..3)), ':x(Range)';
+ nok 'abcabc'.match(rx/a./, :x(3..4)), ':x(Range) > number of matches';
is 'abacadae'.match(rx/a./, :x(1..3)).join('|'), 'ab|ac|ad', ':x(Range) (upper bound)';
is 'abacad'.match(rx/a./, :x(2..5)).join('|'), 'ab|ac|ad', ':x(Range) (takes as much as it can)';
}

0 comments on commit 1fcf803

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