Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.625 kb
#! nqp
plan(7);
ok(NQPCursor.parse('a', :rule(/<alpha>/), :p(0)),
'Can parse "a" with <alpha> and :p(0)');
ok(!NQPCursor.parse('a', :rule(/<alpha>/), :p(1)),
'Can parse "a" with <alpha> :p(off-range)');
ok(!NQPCursor.parse('a', :rule(/<alpha>/), :c(1)),
'Can parse "a" with <alpha> :c(off-range)');
ok(!NQPCursor.parse('a', :rule(/<alpha>/), :p(5)),
'Can parse "a" with <alpha> :p(far-off-range)');
ok(?('ABC' ~~ /:i abc/), ':i works with literals');
ok(?('ABC' ~~ /:i 'abc'/), ':i works with single-quoted literals');
ok(?('ABC' ~~ /:i "abc"/), ':i works with double-quoted literals');
Jump to Line
Something went wrong with that request. Please try again.