Skip to content

Commit 99dc0c8

Browse files
committed
Omit some tests on Ruby 2.4 on Windows
Ruby 2.4 on Windows has some bugs about path processing.
1 parent 45e624e commit 99dc0c8

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

test/rdoc/support/test_case.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,11 @@ def verbose_capture_output
213213
end
214214
end
215215
end
216+
217+
# TODO remove after 2.4 EOL
218+
def omit_on_ruby24_on_windows
219+
if RUBY_VERSION < "2.5" and RUBY_PLATFORM.downcase =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
220+
omit "Path processing in 2.4 has some bugs."
221+
end
222+
end
216223
end

test/rdoc/test_rdoc_options.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class << coder; alias add []=; end
9090
end
9191

9292
def test_encode_with_trim_paths
93+
omit_on_ruby24_on_windows # TODO remove after 2.4 EOL
9394
subdir = nil
9495
coder = {}
9596
class << coder; alias add []=; end
@@ -484,6 +485,7 @@ def test_parse_markup
484485
end
485486

486487
def test_parse_page_dir
488+
omit_on_ruby24_on_windows # TODO remove after 2.4 EOL
487489
assert_nil @options.page_dir
488490

489491
out, err = capture_output do
@@ -627,6 +629,7 @@ def test_parse_visibility
627629
end
628630

629631
def test_parse_write_options
632+
omit_on_ruby24_on_windows # TODO remove after 2.4 EOL
630633
tmpdir = File.join Dir.tmpdir, "test_rdoc_options_#{$$}"
631634
FileUtils.mkdir_p tmpdir
632635

test/rdoc/test_rdoc_rdoc.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def test_normalized_file_list_non_file_directory
182182
end
183183

184184
def test_normalized_file_list_with_dot_doc
185+
omit_on_ruby24_on_windows # TODO remove after 2.4 EOL
185186
expected_files = []
186187
files = temp_dir do |dir|
187188
a = File.expand_path('a.rb')
@@ -209,6 +210,7 @@ def test_normalized_file_list_with_dot_doc
209210
end
210211

211212
def test_normalized_file_list_with_dot_doc_overridden_by_exclude_option
213+
omit_on_ruby24_on_windows # TODO remove after 2.4 EOL
212214
expected_files = []
213215
files = temp_dir do |dir|
214216
a = File.expand_path('a.rb')

0 commit comments

Comments
 (0)