<commit_before><?php

$test_files = glob(dirname(__FILE__)."/unit/*Test.php");
foreach($test_files as $test_file)
{
  include($test_file);
}<commit_msg>Rewrite test runner to use lime_harness<commit_after><?php
require_once(dirname(__FILE__).'/../lib/external/lime.php');

$tests = new lime_harness(array('verbose'=>true));
$tests->register_glob(dirname(__FILE__).'/unit/*Test.php');
$tests->run();
if ($tests->stats['failed_tests'])
{
  exit(1);
}
{'fraction_non_alphanumeric': 0.21205357142857142, 'fraction_numerical': 0.002232142857142857, 'mean_word_length': 7.634615384615385, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4358213', 'n_tokens_mistral': 164, 'n_tokens_neox': 157, 'n_words': 22}