test-unit 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +7 -0
- data/lib/test/unit/priority.rb +7 -3
- data/lib/test/unit/version.rb +1 -1
- data/test/test-priority.rb +19 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fb10c0d7af194e24435b053a461586ada42c4e4e42d041501c2911780174923
|
4
|
+
data.tar.gz: 612e5265d004a19a939f8c46e66ef827c226d6bf6e891d69b0519ab4cf73ac96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fad23c31ae8c91bd9b93669dda077068e987d5dabb5f6ad554d659dc17c5706354d9ef9795a3130fa1a055416cb67355af81c376246ca991990d6e4defd90c49
|
7
|
+
data.tar.gz: 30f78ce8f9a5cfa58936f98354758bb9761f845c1cbeb26665f5b6d4edc0494cc8adb0e0a7ccbe85106affc43d267423088015a134d5afd85c05c1ce79038f1b
|
data/doc/text/news.md
CHANGED
data/lib/test/unit/priority.rb
CHANGED
@@ -148,15 +148,19 @@ module Test
|
|
148
148
|
end
|
149
149
|
|
150
150
|
def escape_class_name(class_name)
|
151
|
-
class_name
|
151
|
+
escape_name(class_name)
|
152
152
|
end
|
153
153
|
|
154
154
|
def escaped_method_name
|
155
|
-
@test.method_name.to_s
|
155
|
+
escape_name(@test.method_name.to_s)
|
156
|
+
end
|
157
|
+
|
158
|
+
def escape_name(name)
|
159
|
+
name.gsub(/(?:[: \/!?=])/) do |matched|
|
156
160
|
case matched
|
157
161
|
when ":"
|
158
162
|
"_colon_"
|
159
|
-
when " "
|
163
|
+
when " ", "/"
|
160
164
|
"_"
|
161
165
|
when "!"
|
162
166
|
".destructive"
|
data/lib/test/unit/version.rb
CHANGED
data/test/test-priority.rb
CHANGED
@@ -104,7 +104,7 @@ class TestUnitPriority < Test::Unit::TestCase
|
|
104
104
|
|
105
105
|
class TestClassName < self
|
106
106
|
def test_colon
|
107
|
-
assert_escaped_name("
|
107
|
+
assert_escaped_name("Test_colon__colon_Priority", "Test::Priority")
|
108
108
|
end
|
109
109
|
|
110
110
|
def test_space
|
@@ -119,6 +119,18 @@ class TestUnitPriority < Test::Unit::TestCase
|
|
119
119
|
assert_escaped_name("test_priority", "test\/priority")
|
120
120
|
end
|
121
121
|
|
122
|
+
def test_question
|
123
|
+
assert_escaped_name("#question.predicate", "#question?")
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_exclamation
|
127
|
+
assert_escaped_name("#exclamation.destructive", "#exclamation!")
|
128
|
+
end
|
129
|
+
|
130
|
+
def test_equal
|
131
|
+
assert_escaped_name("#equal.equal", "#equal=")
|
132
|
+
end
|
133
|
+
|
122
134
|
def assert_escaped_name(expected, class_name)
|
123
135
|
checker = Checker.new(nil)
|
124
136
|
escaped_class_name = checker.send(:escape_class_name, class_name)
|
@@ -148,19 +160,18 @@ class TestUnitPriority < Test::Unit::TestCase
|
|
148
160
|
end
|
149
161
|
|
150
162
|
def test_question
|
151
|
-
assert_escaped_name("
|
163
|
+
assert_escaped_name("test_colon__#question.predicate_case",
|
164
|
+
"test: #question? case")
|
152
165
|
end
|
153
166
|
|
154
167
|
def test_exclamation
|
155
|
-
assert_escaped_name("
|
168
|
+
assert_escaped_name("test_colon__#exclamation.destructive_case",
|
169
|
+
"test: #exclamation! case")
|
156
170
|
end
|
157
171
|
|
158
172
|
def test_equal
|
159
|
-
assert_escaped_name("
|
160
|
-
|
161
|
-
|
162
|
-
def test_colon_and_space
|
163
|
-
assert_escaped_name("test_colon__have_space", "test: have space")
|
173
|
+
assert_escaped_name("test_colon__#equal.equal_case",
|
174
|
+
"test: #equal= case")
|
164
175
|
end
|
165
176
|
|
166
177
|
def assert_escaped_name(expected, test_method_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|