diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-26 05:56:26 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-26 05:56:26 +0000 |
commit | 98c7058bf7b3eab91c62a77cb10b09f6c8ed368e (patch) | |
tree | a90e594c950a1e3160a69f90a9e6215242937ef7 /test/rdoc/test_rdoc_parser.rb | |
parent | ee83dc3fe49ac23321a055a2a4b337499d2494eb (diff) |
Merge RDoc 6.0.3 from upstream.
It fixed the several bugs that was found after RDoc 6 releasing.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_parser.rb')
-rw-r--r-- | test/rdoc/test_rdoc_parser.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb index 5d4da7e425..2638adcd15 100644 --- a/test/rdoc/test_rdoc_parser.rb +++ b/test/rdoc/test_rdoc_parser.rb @@ -1,7 +1,7 @@ # -*- coding: us-ascii -*- # frozen_string_literal: true -require 'rdoc/test_case' +require 'minitest_helper' class TestRDocParser < RDoc::TestCase @@ -19,7 +19,7 @@ class TestRDocParser < RDoc::TestCase def test_class_binary_eh_ISO_2022_JP iso_2022_jp = File.join Dir.tmpdir, "test_rdoc_parser_#{$$}.rd" - open iso_2022_jp, 'wb' do |io| + File.open iso_2022_jp, 'wb' do |io| io.write "# coding: ISO-2022-JP\n" io.write ":\e$B%3%^%s%I\e(B:\n" end @@ -31,7 +31,7 @@ class TestRDocParser < RDoc::TestCase def test_class_binary_eh_marshal marshal = File.join Dir.tmpdir, "test_rdoc_parser_#{$$}.marshal" - open marshal, 'wb' do |io| + File.open marshal, 'wb' do |io| io.write Marshal.dump('') io.write 'lots of text ' * 500 end @@ -92,7 +92,7 @@ class TestRDocParser < RDoc::TestCase def test_class_for_executable temp_dir do content = "#!/usr/bin/env ruby -w\n" - open 'app', 'w' do |io| io.write content end + File.open 'app', 'w' do |io| io.write content end app = @store.add_file 'app' parser = @RP.for app, 'app', content, @options, :stats @@ -126,7 +126,7 @@ class TestRDocParser < RDoc::TestCase temp_dir do content = "# -*- rdoc -*-\n= NEWS\n" - open 'NEWS', 'w' do |io| io.write content end + File.open 'NEWS', 'w' do |io| io.write content end app = @store.add_file 'NEWS' parser = @RP.for app, 'NEWS', content, @options, :stats @@ -140,7 +140,7 @@ class TestRDocParser < RDoc::TestCase def test_can_parse_modeline readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" - open readme_ext, 'w' do |io| + File.open readme_ext, 'w' do |io| io.puts "# README.EXT - -*- rdoc -*- created at: Mon Aug 7 16:45:54 JST 1995" io.puts io.puts "This document explains how to make extension libraries for Ruby." @@ -162,7 +162,7 @@ class TestRDocParser < RDoc::TestCase def test_check_modeline readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" - open readme_ext, 'w' do |io| + File.open readme_ext, 'w' do |io| io.puts "# README.EXT - -*- RDoc -*- created at: Mon Aug 7 16:45:54 JST 1995" io.puts io.puts "This document explains how to make extension libraries for Ruby." @@ -176,7 +176,7 @@ class TestRDocParser < RDoc::TestCase def test_check_modeline_coding readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" - open readme_ext, 'w' do |io| + File.open readme_ext, 'w' do |io| io.puts "# -*- coding: utf-8 -*-" end @@ -188,7 +188,7 @@ class TestRDocParser < RDoc::TestCase def test_check_modeline_with_other readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" - open readme_ext, 'w' do |io| + File.open readme_ext, 'w' do |io| io.puts "# README.EXT - -*- mode: RDoc; indent-tabs-mode: nil -*-" io.puts io.puts "This document explains how to make extension libraries for Ruby." @@ -202,7 +202,7 @@ class TestRDocParser < RDoc::TestCase def test_check_modeline_no_modeline readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" - open readme_ext, 'w' do |io| + File.open readme_ext, 'w' do |io| io.puts "This document explains how to make extension libraries for Ruby." end |