summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_ruby_lex.rb
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/test_rdoc_ruby_lex.rb
parenta7fa4d5d9aab150ad4b0c3f3217fe444df69f527 (diff)
* 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/test_rdoc_ruby_lex.rb')
-rw-r--r--test/rdoc/test_rdoc_ruby_lex.rb20
1 files changed, 20 insertions, 0 deletions
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