Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for "match beyond end of target" bug.
  • Loading branch information
pmichaud committed Jun 2, 2010
1 parent 8483d1f commit 55d87b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/nqp/50-regex.t
@@ -0,0 +1,12 @@
#! nqp

plan(3);

ok(Regex::Cursor.parse('a', :rule(/<alpha>/), :p(0)),
'Can parse "a" with <alpha> and :p(0)');

ok(!Regex::Cursor.parse('a', :rule(/<alpha>/), :p(1)),
'Can parse "a" with <alpha> :p(off-range)');

ok(!Regex::Cursor.parse('a', :rule(/<alpha>/), :p(5)),
'Can parse "a" with <alpha> :p(far-off-range)');

0 comments on commit 55d87b8

Please sign in to comment.