<commit_before>#! nqp

plan(7);

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>/), :c(1)),
        'Can parse "a" with <alpha> :c(off-range)');

ok(!Regex::Cursor.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');<commit_msg>Update a test to use the new NQPCursor type.<commit_after>#! 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');
{'fraction_non_alphanumeric': 0.29132690882134915, 'fraction_numerical': 0.008895478131949592, 'mean_word_length': 4.113636363636363, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3576042', 'n_tokens_mistral': 570, 'n_tokens_neox': 555, 'n_words': 133}