test-unit-runner-tap 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.index +54 -0
- data/lib/test/unit/runner/tap-version.rb +1 -1
- data/lib/test/unit/ui/tap/perl_testrunner.rb +2 -2
- data/test/fixtures/test_example.rb +1 -3
- data/test/run-test.rb +1 -13
- data/test/test_tap.rb +57 -1
- metadata +58 -24
- data/Gemfile.lock +0 -16
- data/History.txt +0 -6
- data/README.rdoc +0 -59
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d0e2d71e36b8f3fa8448f11313740f7f24f2a8a7
|
4
|
+
data.tar.gz: da3390b9e158c98cd58f16fc2e5472596f042962
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 06127f85e23fe71def879c3a5e8b97f54a3b28cc4dde4cefe85de019e1f6ade73c3f3d6a1eef3fe0936aeb3d4e704ffeed5db3ad9eae49edec81635f14022d66
|
7
|
+
data.tar.gz: bbd2593bcc9e9330d9b5a8980e668233312eb931e3468082679ccc5b1b5c0816cc0f6b2ef7c5ea049626e9675e3e27e3d6e4eed4ccec8b23fe92cecb209993fc
|
data/.index
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
revision: 2013
|
3
|
+
type: ruby
|
4
|
+
sources:
|
5
|
+
- Index.rb
|
6
|
+
authors:
|
7
|
+
- name: Thomas Sawyer
|
8
|
+
email: transfire@gmail.com
|
9
|
+
- name: Kouhei Sutou
|
10
|
+
email: kou@cozmixng.org
|
11
|
+
organizations: []
|
12
|
+
requirements:
|
13
|
+
- name: test-unit
|
14
|
+
- groups:
|
15
|
+
- build
|
16
|
+
development: true
|
17
|
+
name: rake
|
18
|
+
- groups:
|
19
|
+
- build
|
20
|
+
development: true
|
21
|
+
name: mast
|
22
|
+
- groups:
|
23
|
+
- build
|
24
|
+
development: true
|
25
|
+
name: indexer
|
26
|
+
conflicts: []
|
27
|
+
alternatives: []
|
28
|
+
resources:
|
29
|
+
- type: home
|
30
|
+
uri: https://github.com/test-unit/test-unit-runner-tap
|
31
|
+
label: Homepage
|
32
|
+
- type: code
|
33
|
+
uri: https://github.com/test-unit/test-unit-runner-tap
|
34
|
+
label: Source Code
|
35
|
+
repositories: []
|
36
|
+
categories: []
|
37
|
+
copyrights:
|
38
|
+
- holder: Thomas Sawyer
|
39
|
+
year: '2012'
|
40
|
+
license: GPL-2
|
41
|
+
- holder: Kouhei Sutou
|
42
|
+
year: '2012'
|
43
|
+
license: GPL-2
|
44
|
+
customs: []
|
45
|
+
paths:
|
46
|
+
lib:
|
47
|
+
- lib
|
48
|
+
name: test-unit-runner-tap
|
49
|
+
title: TestUnit TAP
|
50
|
+
version: 1.1.2
|
51
|
+
summary: TAP runners for TestUnit.
|
52
|
+
description: This project provides TAP and TAP-Y/J test output formats for the TestUnit
|
53
|
+
test framework.
|
54
|
+
date: '2014-11-08'
|
@@ -47,7 +47,7 @@ module Test
|
|
47
47
|
end
|
48
48
|
|
49
49
|
#
|
50
|
-
def tapout_omit(
|
50
|
+
def tapout_omit(fault)
|
51
51
|
doc = super(fault)
|
52
52
|
if doc
|
53
53
|
@i += 1
|
@@ -57,7 +57,7 @@ module Test
|
|
57
57
|
end
|
58
58
|
|
59
59
|
#
|
60
|
-
def tapout_todo(
|
60
|
+
def tapout_todo(fault)
|
61
61
|
doc = super(fault)
|
62
62
|
if doc
|
63
63
|
@i += 1
|
data/test/run-test.rb
CHANGED
@@ -2,26 +2,14 @@
|
|
2
2
|
|
3
3
|
$VERBOSE = true
|
4
4
|
|
5
|
-
$KCODE = "utf8" unless "".respond_to?(:encoding)
|
6
|
-
|
7
5
|
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
8
6
|
lib_dir = File.join(base_dir, "lib")
|
9
7
|
test_dir = File.join(base_dir, "test")
|
10
8
|
|
11
9
|
$LOAD_PATH.unshift(lib_dir)
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
require 'test/unit'
|
16
|
-
|
17
|
-
#test_unit_notify_base_dir = File.join(base_dir, "..", "test-unit-notify")
|
18
|
-
#test_unit_notify_base_dir = File.expand_path(test_unit_notify_base_dir)
|
19
|
-
#if File.exist?(test_unit_notify_base_dir)
|
20
|
-
# $LOAD_PATH.unshift(File.join(test_unit_notify_base_dir, "lib"))
|
21
|
-
# require 'test/unit/notify'
|
22
|
-
#end
|
11
|
+
require 'test-unit'
|
23
12
|
|
24
13
|
files = Dir[File.join(test_dir, 'test_*.rb')]
|
25
14
|
|
26
15
|
exit Test::Unit::AutoRunner.run(true, test_dir, files)
|
27
|
-
|
data/test/test_tap.rb
CHANGED
@@ -31,12 +31,68 @@ not ok 1 - test_fail()
|
|
31
31
|
# => 17 def test_fail; assert_equal(3, 1 - 2); end; fail_line = __LINE__
|
32
32
|
# 18 end
|
33
33
|
# 19 output = StringIO.new
|
34
|
-
# test/test_tap.rb
|
34
|
+
# test/test_tap.rb:#{start_line}
|
35
35
|
ok 2 - test_success()
|
36
36
|
# Finished in 0.001 seconds.
|
37
37
|
# 2 tests, 2 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
|
38
38
|
EOR
|
39
39
|
assert_false(result.passed?) # think this is correct, where as original runner had it wrong
|
40
40
|
end
|
41
|
+
|
42
|
+
def test_omission
|
43
|
+
test_case = Class.new(Test::Unit::TestCase) do
|
44
|
+
def test_omit
|
45
|
+
omit
|
46
|
+
assert_equal(3, 1 + 2)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
output = StringIO.new
|
50
|
+
runner = Test::Unit::UI::Tap::PerlTestRunner.new(test_case.suite, :output => output)
|
51
|
+
result = runner.start; start_line = __LINE__
|
52
|
+
assert_equal(<<-EOR, output.string.gsub(/[\d\.]+ seconds/, "0.001 seconds"))
|
53
|
+
1..1
|
54
|
+
not ok 1 - test_omit() # SKIP
|
55
|
+
# SKIP (Test::Unit::Omission)
|
56
|
+
# omitted.
|
57
|
+
# test/test_tap.rb:45
|
58
|
+
# 43 test_case = Class.new(Test::Unit::TestCase) do
|
59
|
+
# 44 def test_omit
|
60
|
+
# => 45 omit
|
61
|
+
# 46 assert_equal(3, 1 + 2)
|
62
|
+
# 47 end
|
63
|
+
# test/test_tap.rb:#{start_line}
|
64
|
+
# Finished in 0.001 seconds.
|
65
|
+
# 1 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
|
66
|
+
EOR
|
67
|
+
assert_true(result.passed?)
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_pending
|
71
|
+
test_case = Class.new(Test::Unit::TestCase) do
|
72
|
+
def test_pend
|
73
|
+
pend
|
74
|
+
assert_equal(3, 1 + 2)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
output = StringIO.new
|
78
|
+
runner = Test::Unit::UI::Tap::PerlTestRunner.new(test_case.suite, :output => output)
|
79
|
+
result = runner.start; start_line = __LINE__
|
80
|
+
assert_equal(<<-EOR, output.string.gsub(/[\d\.]+ seconds/, "0.001 seconds"))
|
81
|
+
1..1
|
82
|
+
not ok 1 - test_pend() # TODO
|
83
|
+
# TODO (Test::Unit::Pending)
|
84
|
+
# pended.
|
85
|
+
# test/test_tap.rb:73
|
86
|
+
# 71 test_case = Class.new(Test::Unit::TestCase) do
|
87
|
+
# 72 def test_pend
|
88
|
+
# => 73 pend
|
89
|
+
# 74 assert_equal(3, 1 + 2)
|
90
|
+
# 75 end
|
91
|
+
# test/test_tap.rb:#{start_line}
|
92
|
+
# Finished in 0.001 seconds.
|
93
|
+
# 1 tests, 0 assertions, 0 failures, 0 errors, 1 pendings, 0 omissions, 0 notifications
|
94
|
+
EOR
|
95
|
+
assert_true(result.passed?)
|
96
|
+
end
|
41
97
|
end
|
42
98
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit-runner-tap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thomas Sawyer
|
@@ -10,30 +9,64 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: test-unit
|
17
|
-
requirement:
|
18
|
-
none: false
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
|
-
version_requirements:
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
26
28
|
- !ruby/object:Gem::Dependency
|
27
29
|
name: rake
|
28
|
-
requirement:
|
29
|
-
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: mast
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: indexer
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
30
59
|
requirements:
|
31
|
-
- -
|
60
|
+
- - '>='
|
32
61
|
- !ruby/object:Gem::Version
|
33
62
|
version: '0'
|
34
63
|
type: :development
|
35
64
|
prerelease: false
|
36
|
-
version_requirements:
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
37
70
|
description: This project provides TAP and TAP-Y/J test output formats for the TestUnit
|
38
71
|
test framework.
|
39
72
|
email:
|
@@ -41,10 +74,9 @@ email:
|
|
41
74
|
- kou@cozmixng.org
|
42
75
|
executables: []
|
43
76
|
extensions: []
|
44
|
-
extra_rdoc_files:
|
45
|
-
- History.txt
|
46
|
-
- README.rdoc
|
77
|
+
extra_rdoc_files: []
|
47
78
|
files:
|
79
|
+
- .index
|
48
80
|
- lib/test/unit/runner/tap-version.rb
|
49
81
|
- lib/test/unit/runner/tap.rb
|
50
82
|
- lib/test/unit/ui/tap/base_testrunner.rb
|
@@ -56,33 +88,35 @@ files:
|
|
56
88
|
- test/test_tap.rb
|
57
89
|
- test/test_tap0.rb
|
58
90
|
- test/test_tapy.rb
|
59
|
-
- Gemfile.lock
|
60
|
-
- README.rdoc
|
61
|
-
- History.txt
|
62
91
|
homepage: https://github.com/test-unit/test-unit-runner-tap
|
63
92
|
licenses:
|
64
93
|
- GPL-2
|
94
|
+
- GPL-2
|
95
|
+
metadata: {}
|
65
96
|
post_install_message:
|
66
97
|
rdoc_options: []
|
67
98
|
require_paths:
|
68
99
|
- lib
|
69
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
101
|
requirements:
|
72
|
-
- -
|
102
|
+
- - '>='
|
73
103
|
- !ruby/object:Gem::Version
|
74
104
|
version: '0'
|
75
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
106
|
requirements:
|
78
|
-
- -
|
107
|
+
- - '>='
|
79
108
|
- !ruby/object:Gem::Version
|
80
109
|
version: '0'
|
81
110
|
requirements: []
|
82
111
|
rubyforge_project:
|
83
|
-
rubygems_version:
|
112
|
+
rubygems_version: 2.0.3
|
84
113
|
signing_key:
|
85
|
-
specification_version:
|
114
|
+
specification_version: 4
|
86
115
|
summary: TAP runners for TestUnit.
|
87
|
-
test_files:
|
116
|
+
test_files:
|
117
|
+
- test/test_tapy.rb
|
118
|
+
- test/test_tap.rb
|
119
|
+
- test/fixtures/test_example.rb
|
120
|
+
- test/run-test.rb
|
121
|
+
- test/test_tap0.rb
|
88
122
|
has_rdoc:
|
data/Gemfile.lock
DELETED
data/History.txt
DELETED
data/README.rdoc
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
= Test::Unit::Runner::Tap
|
2
|
-
|
3
|
-
* http://test-unit.rubyforge.org
|
4
|
-
|
5
|
-
== DESCRIPTION:
|
6
|
-
|
7
|
-
<b>Test::Unit::Runner::Tap</b> - A console Test::Unit UI supporting TAP and TAP-Y/J
|
8
|
-
format.
|
9
|
-
|
10
|
-
See {TAP}[http://testanything.org] for more information about TAP format.
|
11
|
-
|
12
|
-
See {TAPOUT}[http://rubyworks.github.com/tapout] for more information about
|
13
|
-
TAP-Y/J format.
|
14
|
-
|
15
|
-
== INSTALL:
|
16
|
-
|
17
|
-
$ sudo gem install test-unit-runner-tap
|
18
|
-
|
19
|
-
== USAGE:
|
20
|
-
|
21
|
-
It you test helper script use:
|
22
|
-
|
23
|
-
require 'test/unit/runner/tap'
|
24
|
-
|
25
|
-
Then you can select the runner via the `--runner` command line option.
|
26
|
-
|
27
|
-
$ ruby test/run_tests.rb --runner yaml
|
28
|
-
|
29
|
-
Available runners are `tap`, `tapy`/`yaml` or `tapj`/`json`.
|
30
|
-
|
31
|
-
The runner can also be specified in code, if need be. See API documentation
|
32
|
-
for more information on how to do this.
|
33
|
-
|
34
|
-
To use TAP-Y/J formats with TAPOUT, just pipe results to tapout utility.
|
35
|
-
|
36
|
-
$ ruby test/run_tests.rb --runner yaml | tapout
|
37
|
-
|
38
|
-
See TAPOUT poject for more information on that.
|
39
|
-
|
40
|
-
== LICENSE:
|
41
|
-
|
42
|
-
(LGPL v3.0 License)
|
43
|
-
|
44
|
-
Copyright (c) 2012 Trans & Kouhei Sutou
|
45
|
-
|
46
|
-
This program is free software: you can redistribute it and/or modify
|
47
|
-
it under the terms of the GNU General Public License as published by
|
48
|
-
the Free Software Foundation, either version 3 of the License, or
|
49
|
-
(at your option) any later version.
|
50
|
-
|
51
|
-
This program is distributed in the hope that it will be useful,
|
52
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
53
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
54
|
-
GNU General Public License for more details.
|
55
|
-
|
56
|
-
You should have received a copy of the GNU General Public License
|
57
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
58
|
-
|
59
|
-
(See COPYING file for more details.)
|