test-unit 3.3.2 → 3.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b605100d1823a7003414a1197ac8b6412a2711439591fb1772fbdbe66bda324
4
- data.tar.gz: 799422c8a9fa294365e3a6b6b2b7fa7e5352882bd10df2b877ed751f1383ff69
3
+ metadata.gz: 9fb10c0d7af194e24435b053a461586ada42c4e4e42d041501c2911780174923
4
+ data.tar.gz: 612e5265d004a19a939f8c46e66ef827c226d6bf6e891d69b0519ab4cf73ac96
5
5
  SHA512:
6
- metadata.gz: a91dd90de4e2e044234710e53d175be3db38af3497b2e04c84b9876b06a95f14f0636bfd68b20905d964969aeac0a92bb22a91f86a5413d18e8e636473778573
7
- data.tar.gz: eb2ae248c0be1740915e9f31631a8c7d3e2d5e3dbf1d93b92bb55880bb7038eacf4351d0120e9e78f7c893fbef14035835cbad703f00e237eaa41346f2f9e0ee
6
+ metadata.gz: fad23c31ae8c91bd9b93669dda077068e987d5dabb5f6ad554d659dc17c5706354d9ef9795a3130fa1a055416cb67355af81c376246ca991990d6e4defd90c49
7
+ data.tar.gz: 30f78ce8f9a5cfa58936f98354758bb9761f845c1cbeb26665f5b6d4edc0494cc8adb0e0a7ccbe85106affc43d267423088015a134d5afd85c05c1ce79038f1b
@@ -1,5 +1,12 @@
1
1
  # News
2
2
 
3
+ ## 3.3.3 - 2019-05-10 {#version-3-3-3}
4
+
5
+ ### Fixed
6
+
7
+ * Fixed a bug that priority mode with test case name that uses
8
+ special characters such as `?` can't be used on Windows.
9
+
3
10
  ## 3.3.2 - 2019-04-11 {#version-3-3-2}
4
11
 
5
12
  ### Fixes
@@ -148,15 +148,19 @@ module Test
148
148
  end
149
149
 
150
150
  def escape_class_name(class_name)
151
- class_name.gsub(/(?:[: \\\/])/, "_")
151
+ escape_name(class_name)
152
152
  end
153
153
 
154
154
  def escaped_method_name
155
- @test.method_name.to_s.gsub(/(?:[: ]|[!?=]$)/) do |matched|
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"
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.3.2"
3
+ VERSION = "3.3.3"
4
4
  end
5
5
  end
@@ -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("Test__Priority", "Test::Priority")
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("test_question.predicate", "test_question?")
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("test_exclamation.destructive", "test_exclamation!")
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("test_equal.equal", "test_equal=")
160
- end
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.2
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-04-10 00:00:00.000000000 Z
12
+ date: 2019-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert