File: run.rb

package info (click to toggle)
ruby-test-unit 3.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,348 kB
  • sloc: ruby: 16,403; makefile: 9
file content (28 lines) | stat: -rwxr-xr-x 743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env ruby

$VERBOSE = true

$KCODE = "utf8" unless "".respond_to?(:encoding)

base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
lib_dir = File.join(base_dir, "lib")
test_dir = File.join(base_dir, "test")

$LOAD_PATH.unshift(lib_dir)

unless ENV["TESTOPTS"].nil?
  require "shellwords"
  args = Shellwords.shellsplit(ENV["TESTOPTS"])
  ARGV.push(*args)
end

require 'test/unit'

test_unit_notify_base_dir = File.join(base_dir, "..", "test-unit-notify")
test_unit_notify_base_dir = File.expand_path(test_unit_notify_base_dir)
if File.exist?(test_unit_notify_base_dir)
  $LOAD_PATH.unshift(File.join(test_unit_notify_base_dir, "lib"))
  require 'test/unit/notify'
end

exit Test::Unit::AutoRunner.run(true, test_dir)