<commit_before>require 'test/unit'

class RiceTest < Test::Unit::TestCase
  # TODO: probably a better way to find this out...
  VERBOSE = ARGV.include?('-v')

  def test_unittest
    run_external_test('./unittest')
  end

  def test_vm_unittest
    run_external_test('./vm_unittest')
  end

  def run_external_test(executable)
    if VERBOSE then
      system(executable)
    else<commit_msg>Append EXEEXT to executable names.<commit_after>require 'test/unit'
require 'rbconfig'

class RiceTest < Test::Unit::TestCase
  # TODO: probably a better way to find this out...
  VERBOSE = ARGV.include?('-v')

  EXEEXT = Config::CONFIG['EXEEXT']

  def test_unittest
    run_external_test("./unittest#{EXEEXT}")
  end

  def test_vm_unittest
    run_external_test("./vm_unittest#{EXEEXT}")
  end

  def run_external_test(executable)
    if VERBOSE then
      system(executable)
    else
{'fraction_non_alphanumeric': 0.10921501706484642, 'fraction_numerical': 0.0, 'mean_word_length': 3.888888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1309261', 'n_tokens_mistral': 305, 'n_tokens_neox': 298, 'n_words': 69}