[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 коммит произвёл git
Родитель 39909d8c18
Коммит a87de5e3c1
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -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