aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc
diff options
context:
space:
mode:
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