File: suite.rb

package info (click to toggle)
librexml-ruby 1.2.5-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 792 kB
  • ctags: 655
  • sloc: ruby: 3,778; xml: 1,609; java: 109; makefile: 43
file content (33 lines) | stat: -rw-r--r-- 744 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
29
30
31
32
33
#!/usr/bin/ruby -I. -w

require "runit/testcase"
require "runit/cui/testrunner"

require "test/core_test"
require "test/xpath_test"
require "test/sub_test"

# Possible usage:
# 	suite.rb xpath				runs the XPath suite
# 	suite.rb xpath <test>	runs <test> from the XPath suite
# 	suite.rb <test>			runs <test> from the core suite
# 	suite.rb						runs all tests
if ARGV.size > 0
	if ARGV[0] == "xpath"
		test = XPathTester
	elsif ARGV[0] == "subtest"
		test = SubTester
	else
		test = Tester
		ARGV<<ARGV[0] if ARGV.size == 1
	end
	if ARGV.size == 2
		test = test.new(ARGV[1])
	else
		test = test.suite
	end
	RUNIT::CUI::TestRunner.run( test )
else
	RUNIT::CUI::TestRunner.run( Tester.suite )
	RUNIT::CUI::TestRunner.run( XPathTester.suite )
end