1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rdoc] Special characters are prohibited as filename on Windows

https://github.com/ruby/rdoc/commit/13b9da5932
This commit is contained in:
Nobuyoshi Nakada 2022-10-07 11:38:21 +09:00 committed by git
parent 39909d8c18
commit a87de5e3c1

View file

@ -234,7 +234,16 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase
end end
def test_generated_filename_with_html_tag def test_generated_filename_with_html_tag
@store.add_file '"><em>should be escaped' filename = '"><em>should be escaped'
begin # in @tmpdir
File.write(filename, '')
rescue SystemCallError
# ", <, > chars are prohibited as filename
return
else
File.unlink(filename)
end
@store.add_file filename
doc = @store.all_files.last doc = @store.all_files.last
doc.parser = RDoc::Parser::Simple doc.parser = RDoc::Parser::Simple