Skip to content

Commit 989aefd

Browse files
committed
Add test_class_tokenize_character_literal_with_escape
1 parent 950e388 commit 989aefd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/test_rdoc_ruby_lex.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ def test_class_tokenize_character_literal
7373
assert_equal expected, tokens
7474
end
7575

76+
def test_class_tokenize_character_literal_with_escape
77+
tokens = RDoc::RubyLex.tokenize "?\\s", nil
78+
79+
expected = [
80+
@TK::TkCHAR.new( 0, 1, 0, "?\\s"),
81+
@TK::TkNL .new( 3, 1, 3, "\n"),
82+
]
83+
84+
assert_equal expected, tokens
85+
end
86+
7687
def test_class_tokenize_def_heredoc
7788
tokens = RDoc::RubyLex.tokenize <<-'RUBY', nil
7889
def x

0 commit comments

Comments
 (0)