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