[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
1 changed files with 10 additions and 1 deletions

View File

@ -234,7 +234,16 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase
end
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.parser = RDoc::Parser::Simple