Skip to content

Commit

Permalink
[t/spec] fudge S05-metasyntax/repeat.t for rakudo
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@30047 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Mar 12, 2010
1 parent 1d7f08b commit 171846e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions S05-metasyntax/repeat.t
Expand Up @@ -24,23 +24,27 @@ is $/, 'abc' x 4, '...with the correct capture';
ok(!("abcabcabcabcd" ~~ m/[abc]**5/), 'Fail fixed exact repetition');
#?pugs todo force_todo
ok("abcabcabcabcd" ~~ m/[abc]**{4}/, 'Fixed exact repetition using closure');
#?rakudo todo 'closure repetition'
ok(!( "abcabcabcabcd" ~~ m/[abc]**{5}/ ), 'Fail fixed exact repetition using closure');

# Closed range repetition
ok("abcabcabcabcd" ~~ m/[abc]**2..4/, 'Fixed range repetition');
ok(!( "abc" ~~ m/[abc]**2..4/ ), 'Fail fixed range repetition');
#?pugs todo force_todo
ok("abcabcabcabcd" ~~ m/[abc]**{2..4}/, 'Fixed range repetition using closure');
#?rakudo todo 'closure repetition'
ok(!( "abc" ~~ m/[abc]**{2..4}/ ), 'Fail fixed range repetition using closure');

# Open range repetition
ok("abcabcabcabcd" ~~ m/[abc]**2..*/, 'Open range repetition');
ok(!( "abcd" ~~ m/[abc]**2..*/ ), 'Fail open range repetition');
#?pugs todo force_todo
ok("abcabcabcabcd" ~~ m/[abc]**{2..*}/, 'Open range repetition using closure');
#?rakudo todo 'closure repetition'
ok(!( "abcd" ~~ m/[abc]**{2..*}/), 'Fail open range repetition using closure');

# It is illegal to return a list, so this easy mistake fails:
#?rakudo todo 'catch {1,3} old-style repetition quantifier'
eval_dies_ok('"foo" ~~ m/o{1,3}/', 'P5-style {1,3} range mistake is caught');
eval_dies_ok('"foo" ~~ m/o{1,}/}', 'P5-style {1,} range mistake is caught');

Expand Down

0 comments on commit 171846e

Please sign in to comment.