<commit_before>#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Long;
use IO::Handle;
use IPC::Open2 qw( open2 );
use POSIX qw( WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );

my $VALGRIND = 0;
GetOptions(
   'valgrind|v+' => \$VALGRIND,
) or exit 1;

my ( $hin, $hout, $hpid );
{
   local $ENV{LD_LIBRARY_PATH} = ".";
   my @command = "t/.libs/harness";
   unshift @command, "valgrind", "--quiet", "--error-exitcode=126" if $VALGRIND;

   $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
}

my $exitcode = 0;<commit_msg>Ensure that 'make test' actually uses built library, not installed one<commit_after>#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Long;
use IO::Handle;
use IPC::Open2 qw( open2 );
use POSIX qw( WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );

my $VALGRIND = 0;
GetOptions(
   'valgrind|v+' => \$VALGRIND,
) or exit 1;

my ( $hin, $hout, $hpid );
{
   local $ENV{LD_LIBRARY_PATH} = ".libs";
   my @command = "t/.libs/harness";
   unshift @command, "valgrind", "--quiet", "--error-exitcode=126" if $VALGRIND;

   $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
}

my $exitcode = 0;
{'fraction_non_alphanumeric': 0.1734253666954271, 'fraction_numerical': 0.01725625539257981, 'mean_word_length': 4.155555555555556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4574200', 'n_tokens_mistral': 493, 'n_tokens_neox': 467, 'n_words': 128}