summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-07 11:38:21 +0900
committergit <svn-admin@ruby-lang.org>2022-10-07 12:12:10 +0900
commita87de5e3c111a1af92fbfd877d0ad8050444f3fa (patch)
treedaccb231fa12f9de9e4e04aa8bed7ce5586e0eac
parent39909d8c18ede7bb94bbcd0ad00d41b2f545528b (diff)
[ruby/rdoc] Special characters are prohibited as filename on Windows
https://github.com/ruby/rdoc/commit/13b9da5932
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb11
1 files changed, 10 insertions, 1 deletions
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 '"><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