<commit_before># $Id$

package Parrot::Test::M4::PIR;

use strict;
use warnings;
use 5.006;

use base 'Parrot::Test::M4';
use Data::Dumper;

# Generate output_is(), output_isnt() and output_like() in current package.
Parrot::Test::generate_languages_functions(); 

sub get_out_fn {
    my $self = shift;
    my ($count) = @_;

    return Parrot::Test::per_test( '.pir_out', $count );
}

sub get_test_prog {
    my $self = shift;
    my ( $count, $options ) = @_;

    my $lang_fn = Parrot::Test::per_test( '.m4', $count );
    ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() );
    if ( $current_dir eq 'm4' ) {
        $lang_fn = File::Spec->catdir( 'm4', $lang_fn );
    }

    my $test_prog_args = $ENV{TEST_PROG_ARGS} || q{};

    return "./parrot languages/m4/m4.pbc languages/${lang_fn}";
    return 
        join( ' ',
              $self->{parrot},
              File::Spec->join( qw( languages m4 m4.pbc ) ),
              $test_prog_args,
              File::Spec->join( qw( languages $lang_fn ) ),
              $lang_fn );
}

1;

# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4:<commit_msg>[m4] $lang_fn was twice in command<commit_after># $Id$

package Parrot::Test::M4::PIR;

use strict;
use warnings;
use 5.006;

use base 'Parrot::Test::M4';
use Data::Dumper;

# Generate output_is(), output_isnt() and output_like() in current package.
Parrot::Test::generate_languages_functions(); 

sub get_out_fn {
    my $self = shift;
    my ($count) = @_;

    return Parrot::Test::per_test( '.pir_out', $count );
}

sub get_test_prog {
    my $self = shift;
    my ( $count, $options ) = @_;

    my $lang_fn = Parrot::Test::per_test( '.m4', $count );
    ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() );
    if ( $current_dir eq 'm4' ) {
        $lang_fn = File::Spec->catdir( 'm4', $lang_fn );
    }

    my $test_prog_args = $ENV{TEST_PROG_ARGS} || q{};

    return "./parrot languages/m4/m4.pbc languages/${lang_fn}";
    return 
        join( ' ',
              $self->{parrot},
              File::Spec->join( qw( languages m4 m4.pbc ) ),
              $test_prog_args,
              File::Spec->join( qw( languages $lang_fn ) ) );
}

1;

# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
{'fraction_non_alphanumeric': 0.17175094024237358, 'fraction_numerical': 0.0162975344755537, 'mean_word_length': 2.9181669394435352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2218363', 'n_tokens_mistral': 934, 'n_tokens_neox': 888, 'n_words': 197}