<commit_before>#!perl
# Copyright (C) 2001-2005, Parrot Foundation.
# $Id$

use strict;
use warnings;
use lib qw( t . lib ../lib ../../lib ../../../lib );
use Test::More;
use Parrot::Test tests => 20;
use Parrot::Test::PGE;

=head1 NAME

t/compilers/pge/perl6regex/context.t - PGE return value tests

=head1 DESCRIPTION

These tests are based on L<http://dev.perl.org/perl6/doc/design/syn/S05.html>,
ver. 8, in the B<'Return values from matches'> section

=head1 SYNOPSIS

        % prove t/compilers/pge/perl6regex/context.t

=cut

my $PRE = <<PRE;
.sub 'main' :main
    load_bytecode "PGE.pbc"
    load_bytecode "dumper.pbc"
    load_bytecode "PGE/Dumper.pbc"
    load_bytecode "PGE/Glob.pbc"
    load_bytecode "PGE/Text.pbc"
    .local string target, pattern
    .local pmc perl6regex, rulesub, pir, exp, match
    perl6regex = compreg 'PGE::Perl6Regex'
    null match
    null rulesub
PRE
my $POST = <<'POST';
    goto OK
NOK:
    print "not "
OK:
    print "ok"
END:
        print "\n"
.end
POST
<commit_msg>[cage] fix a duplicate local in a perl6regex test<commit_after>#!perl
# Copyright (C) 2001-2005, Parrot Foundation.
# $Id$

use strict;
use warnings;
use lib qw( t . lib ../lib ../../lib ../../../lib );
use Test::More;
use Parrot::Test tests => 20;
use Parrot::Test::PGE;

=head1 NAME

t/compilers/pge/perl6regex/context.t - PGE return value tests

=head1 DESCRIPTION

These tests are based on L<http://dev.perl.org/perl6/doc/design/syn/S05.html>,
ver. 8, in the B<'Return values from matches'> section

=head1 SYNOPSIS

        % prove t/compilers/pge/perl6regex/context.t

=cut

my $PRE = <<PRE;
.sub 'main' :main
    load_bytecode "PGE.pbc"
    load_bytecode "dumper.pbc"
    load_bytecode "PGE/Dumper.pbc"
    load_bytecode "PGE/Glob.pbc"
    load_bytecode "PGE/Text.pbc"
    .local string target, pattern
    .local pmc perl6regex, rulesub, pir, match
    perl6regex = compreg 'PGE::Perl6Regex'
    null match
    null rulesub
PRE
my $POST = <<'POST';
    goto OK
NOK:
    print "not "
OK:
    print "ok"
END:
        print "\n"
.end
POST

{'fraction_non_alphanumeric': 0.14049586776859505, 'fraction_numerical': 0.021876519202722412, 'mean_word_length': 3.0352941176470587, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 9, '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': '6328136', 'n_tokens_mistral': 837, 'n_tokens_neox': 787, 'n_words': 221}