<commit_before>function _fail(s, m) {
  // string split to avoid problems with tests that end up printing the value of window._fail.
  window.alert("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m);
}

function _pass(s, m) {
  window.alert("TEST-PASS | " + s + ": " + m);
}

function is(a, b, c) {
  let f = a != b ? _fail : _pass;
  let m = !c ? "" : c;
  f(a + " == " + b, m);
}

function isnot(a, b, c) {
  let f = (a != b) ? _pass : _fail;
  let m = !c ? "" : c;
  f(a + " != " + b, m);
}

var _test_complete = false;
var _test_timeout = 10000; //10 seconds
function finish() {
  _test_complete = true;
  window.close();
}

function _test_timed_out() {
  if (!_test_complete) {
    _fail('test timed out (' + _test_timeout/1000 + 's)');<commit_msg>harness: Truncate messages to one line<commit_after>function _oneline(x) {
  var i = x.indexOf("\n");
  return (i == -1) ? x : (x.slice(0, i) + "...");
}

function _fail(s, m) {
  // string split to avoid problems with tests that end up printing the value of window._fail.
  window.alert(_oneline("TEST-UNEXPECTED" + "-FAIL | " + s + ": " + m));
}

function _pass(s, m) {
  window.alert(_oneline("TEST-PASS | " + s + ": " + m));
}

function is(a, b, c) {
  let f = a != b ? _fail : _pass;
  let m = !c ? "" : c;
  f(a + " == " + b, m);
}

function isnot(a, b, c) {
  let f = (a != b) ? _pass : _fail;
  let m = !c ? "" : c;
  f(a + " != " + b, m);
}

var _test_complete = false;
var _test_timeout = 10000; //10 seconds
function finish() {
  _test_complete = true;
  window.close();
}

function _test_timed_out() {
  if (!_test_complete) {
    _fail('test timed out (' + _test_timeout/1000 + 's)');
{'fraction_non_alphanumeric': 0.19744835965978128, 'fraction_numerical': 0.014580801944106925, 'mean_word_length': 2.968674698795181, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '797760', 'n_tokens_mistral': 678, 'n_tokens_neox': 659, 'n_words': 183}