Skip to content

Commit 13b9da5

Browse files
committed
Special characters are prohibited as filename on Windows
1 parent 2ebf8fd commit 13b9da5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/rdoc/test_rdoc_generator_darkfish.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,16 @@ def test_generated_method_with_html_tag_yield
234234
end
235235

236236
def test_generated_filename_with_html_tag
237-
@store.add_file '"><em>should be escaped'
237+
filename = '"><em>should be escaped'
238+
begin # in @tmpdir
239+
File.write(filename, '')
240+
rescue SystemCallError
241+
# ", <, > chars are prohibited as filename
242+
return
243+
else
244+
File.unlink(filename)
245+
end
246+
@store.add_file filename
238247
doc = @store.all_files.last
239248
doc.parser = RDoc::Parser::Simple
240249

0 commit comments

Comments
 (0)