summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
-rw-r--r--test/rdoc/test_rdoc_markup_parser.rb10
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb10
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb4
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb14
4 files changed, 30 insertions, 8 deletions
@@ -7,13 +7,15 @@ class TestRDocMarkupParser < RDoc::TestCase
def setup
super
@RMP = @RM::Parser
end
def mu_pp(obj)
s = ''
s = PP.pp obj, s
- s = s.force_encoding(Encoding.default_external) if defined? Encoding
s.chomp
end
@@ -34,7 +36,7 @@ class TestRDocMarkupParser < RDoc::TestCase
s.scan(/\S+/)
- if Object.const_defined? :Encoding then
assert_equal 3, parser.char_pos(s.pos)
else
assert_equal 4, parser.char_pos(s.pos)
@@ -1364,7 +1366,7 @@ cat::
end
def test_tokenize_note_utf_8
- skip 'Encoding not implemented' unless Object.const_defined? :Encoding
str = <<-STR
cät:: l1a
@@ -1630,7 +1632,7 @@ Example heading:
s.scan(/\S+/)
- if Object.const_defined? :Encoding then
assert_equal [3, 0], parser.token_pos(s.pos)
else
assert_equal [4, 0], parser.token_pos(s.pos)
@@ -1684,6 +1684,16 @@ end
assert_equal "def \317\211", omega.text
end
def test_parse_statements_class_if
util_parser <<-CODE
module Foo
@@ -142,8 +142,6 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_parse_file
- pwd = Dir.pwd
-
@rdoc.store = RDoc::Store.new
temp_dir do |dir|
@@ -153,8 +151,6 @@ class TestRDocRDoc < RDoc::TestCase
io.puts 'hi'
end
- test_txt = File.join dir, 'test.txt'
-
top_level = @rdoc.parse_file 'test.txt'
assert_equal 'test.txt', top_level.absolute_name
@@ -100,6 +100,20 @@ class TestRDocRubygemsHook < Gem::TestCase
assert rdoc.options.hyperlink_all
end
def test_generate_disabled
@hook.generate_rdoc = false
@hook.generate_ri = false