summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_parser.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
commitd42d6e690e3f553b971322eae783ac6b0d4d9692 (patch)
tree2004bf4517ee7b81466c300cf30092e62e65467e /test/rdoc/test_rdoc_parser.rb
parent670c6e8ce9d4a12bb4832e10fab27365398649bf (diff)
* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_parser.rb')
-rw-r--r--test/rdoc/test_rdoc_parser.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index e2494a1b06..34d4486cb1 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -15,6 +15,19 @@ class TestRDocParser < RDoc::TestCase
@options = RDoc::Options.new
end
+ 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|
+ io.write "# coding: ISO-2022-JP\n"
+ io.write ":\e$B%3%^%s%I\e(B:\n"
+ end
+
+ refute @RP.binary? iso_2022_jp
+ ensure
+ File.unlink iso_2022_jp
+ end
+
def test_class_binary_eh_marshal
marshal = File.join Dir.tmpdir, "test_rdoc_parser_#{$$}.marshal"
open marshal, 'wb' do |io|
@@ -96,7 +109,7 @@ class TestRDocParser < RDoc::TestCase
def test_class_for_forbidden
skip 'chmod not supported' if Gem.win_platform?
- Tempfile.create 'forbidden' do |io|
+ tf = Tempfile.open 'forbidden' do |io|
begin
File.chmod 0000, io.path
forbidden = @store.add_file io.path
@@ -107,7 +120,9 @@ class TestRDocParser < RDoc::TestCase
ensure
File.chmod 0400, io.path
end
+ io
end
+ tf.close! if tf.respond_to? :close!
end
def test_class_for_modeline