<commit_before>use strict;
use warnings FATAL => 'all';

use Test;
use Apache::TestUtil;
use Apache::TestRequest ();

my @test_strings = qw(MODPERL 2.0 RULES);

plan tests => 1 + @test_strings;

my $module = "TestFilter::both_str_con_add";
my $socket = Apache::TestRequest::vhost_socket($module);

ok $socket;

for my $str (@test_strings) {
    print $socket "$str\n";
    chomp(my $reply = <$socket>);
    $str = lc $str;
    $str =~ s/modperl/mod_perl/;
    ok t_cmp($str, $reply);
}<commit_msg>Prevent "Use of uninitialized value in chomp" warnings PR: Obtained from: Submitted by: Reviewed by:<commit_after>use strict;
use warnings FATAL => 'all';

use Test;
use Apache::TestUtil;
use Apache::TestRequest ();

my @test_strings = qw(MODPERL 2.0 RULES);

plan tests => 1 + @test_strings;

my $module = "TestFilter::both_str_con_add";
my $socket = Apache::TestRequest::vhost_socket($module);

ok $socket;

for my $str (@test_strings) {
    print $socket "$str\n";
    chomp(my $reply = <$socket>||'');
    $str = lc $str;
    $str =~ s/modperl/mod_perl/;
    ok t_cmp($str, $reply);
}
{'fraction_non_alphanumeric': 0.16589861751152074, 'fraction_numerical': 0.005529953917050691, 'mean_word_length': 4.626943005181347, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2823374', 'n_tokens_mistral': 418, 'n_tokens_neox': 406, 'n_words': 108}