aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-19 00:47:33 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-19 00:47:33 +0000
commitcc46b530b00c83bf4a867fd42d81c63bc43c0b83 (patch)
tree0e4c0f13bc642824acf88fa7f24cf616212fbec3 /test/rdoc
parenta7fa4d5d9aab150ad4b0c3f3217fe444df69f527 (diff)
downloadruby-cc46b530b00c83bf4a867fd42d81c63bc43c0b83.tar.gz
* 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
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb9
-rw-r--r--test/rdoc/test_rdoc_ruby_lex.rb20
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb2
3 files changed, 23 insertions, 8 deletions
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