From a87de5e3c111a1af92fbfd877d0ad8050444f3fa Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 7 Oct 2022 11:38:21 +0900 Subject: [PATCH] [ruby/rdoc] Special characters are prohibited as filename on Windows https://github.com/ruby/rdoc/commit/13b9da5932 --- test/rdoc/test_rdoc_generator_darkfish.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb index 140cf0916b..6aecde5287 100644 --- a/test/rdoc/test_rdoc_generator_darkfish.rb +++ b/test/rdoc/test_rdoc_generator_darkfish.rb @@ -234,7 +234,16 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase end def test_generated_filename_with_html_tag - @store.add_file '">should be escaped' + filename = '">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