<commit_before>/*global require, exports, print */

var runTest = require('jsunity').runTest,
  _ = require('underscore'),
  internal = require('internal'),
  runJSUnityTests,
  runJasmineTests,
  runCommandLineTests;

////////////////////////////////////////////////////////////////////////////////
/// @brief runs all jsunity tests
////////////////////////////////////////////////////////////////////////////////

runJSUnityTests = function (tests) {
  'use strict';
  var result = true;

  _.each(tests, function (file) {
    if (result) {
      print("\nRunning JSUnity test from file '" + file + "'");
    } else {
      print("\nSkipping JSUnity test from file '" + file + "' due to previous errors");
    }

    try {
      result = result && runTest(file);
    } catch (err) {
      print("cannot run test file '" + file + "': " + err);
      print(err.stack);
      result = false;
    }
<commit_msg>Evaluate the correct return code here too.<commit_after>/*global require, exports, print */

var runTest = require('jsunity').runTest,
  _ = require('underscore'),
  internal = require('internal'),
  runJSUnityTests,
  runJasmineTests,
  runCommandLineTests;

////////////////////////////////////////////////////////////////////////////////
/// @brief runs all jsunity tests
////////////////////////////////////////////////////////////////////////////////

runJSUnityTests = function (tests) {
  'use strict';
  var result = true;

  _.each(tests, function (file) {
    if (result) {
      print("\nRunning JSUnity test from file '" + file + "'");
    } else {
      print("\nSkipping JSUnity test from file '" + file + "' due to previous errors");
    }

    try {
      result = result && runTest(file).status;
    } catch (err) {
      print("cannot run test file '" + file + "': " + err);
      print(err.stack);
      result = false;
    }

{'fraction_non_alphanumeric': 0.29341963322545844, 'fraction_numerical': 0.0, 'mean_word_length': 1.6090014064697609, 'pattern_counts': {'":': 0, '<': 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': '2969540', 'n_tokens_mistral': 492, 'n_tokens_neox': 476, 'n_words': 132}