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

use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;

plan tests => 3;

my $location = '/TestDirective::setupenv';

my $env = GET_BODY $location;

ok $env;
print $env;
my %env;

for my $line (split /\n/, $env) {
    next unless $line =~ /=/;
    my($key, $val) = split /=/, $line, 2;
    $env{$key} = $val || '';
}
use Data::Dumper;
print Dumper \%env;

ok t_cmp $location, $env{REQUEST_URI}, "testing REQUEST_URI";

ok not exists $env{HOME};<commit_msg>remove debug prints (-d lwp gives plenty)<commit_after>use strict;
use warnings FATAL => 'all';

use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;

plan tests => 3;

my $location = '/TestDirective::setupenv';

my $env = GET_BODY $location;

ok $env;

my %env;

for my $line (split /\n/, $env) {
    next unless $line =~ /=/;
    my($key, $val) = split /=/, $line, 2;
    $env{$key} = $val || '';
}

ok t_cmp $location, $env{REQUEST_URI}, "testing REQUEST_URI";

ok not exists $env{HOME};
{'fraction_non_alphanumeric': 0.18829268292682927, 'fraction_numerical': 0.003902439024390244, 'mean_word_length': 4.104477611940299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5288235', 'n_tokens_mistral': 401, 'n_tokens_neox': 384, 'n_words': 116}