From cc46b530b00c83bf4a867fd42d81c63bc43c0b83 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 19 Nov 2013 00:47:33 +0000 Subject: * lib/rdoc: Update to RDoc master a1195ce. Changes include: Improved accessibility of the main sidebar navigation. Fixed handling of regexp options in HTML source highlighting. * test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rdoc/test_rdoc_generator_darkfish.rb | 9 ++------- test/rdoc/test_rdoc_ruby_lex.rb | 20 ++++++++++++++++++++ test/rdoc/test_rdoc_rubygems_hook.rb | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'test/rdoc') diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb index 1cefdbf658..ff21515dfd 100644 --- a/test/rdoc/test_rdoc_generator_darkfish.rb +++ b/test/rdoc/test_rdoc_generator_darkfish.rb @@ -219,13 +219,8 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase return end - # This guard is quoted from test/ruby/test_file_exhaustive.rb - unless /emx|mswin|mingw/ =~ RUBY_PLATFORM - # on Windows, nlink is always 1. but this behavior will be changed - # in the future. - assert_operator File.stat(filename).nlink, :>, 1, - "#{filename} is not hard-linked" - end + assert_operator File.stat(filename).nlink, :>, 1, + "#{filename} is not hard-linked" end end diff --git a/test/rdoc/test_rdoc_ruby_lex.rb b/test/rdoc/test_rdoc_ruby_lex.rb index e1500c554d..22cf0f6295 100644 --- a/test/rdoc/test_rdoc_ruby_lex.rb +++ b/test/rdoc/test_rdoc_ruby_lex.rb @@ -242,6 +242,26 @@ U assert_equal expected, tokens end + def test_class_tokenize_regexp_options + tokens = RDoc::RubyLex.tokenize "/hAY/i", nil + + expected = [ + @TK::TkREGEXP.new( 0, 1, 0, "/hAY/i"), + @TK::TkNL .new( 6, 1, 6, "\n"), + ] + + assert_equal expected, tokens + + tokens = RDoc::RubyLex.tokenize "/hAY/ix", nil + + expected = [ + @TK::TkREGEXP.new( 0, 1, 0, "/hAY/ix"), + @TK::TkNL .new( 7, 1, 7, "\n"), + ] + + assert_equal expected, tokens + end + def test_class_tokenize_regexp_backref tokens = RDoc::RubyLex.tokenize "/[csh](..) [csh]\\1 in/", nil diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index 499d5ac071..cee0810ab4 100644 --- a/test/rdoc/test_rdoc_rubygems_hook.rb +++ b/test/rdoc/test_rdoc_rubygems_hook.rb @@ -10,7 +10,7 @@ class TestRDocRubygemsHook < Gem::TestCase skip 'requires RubyGems 1.9+' unless Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.9') - @a = util_spec 'a' do |s| + @a = util_spec 'a', 2 do |s| s.rdoc_options = %w[--main MyTitle] s.extra_rdoc_files = %w[README] end -- cgit v1.2.3