Skip to content

Commit c1c16de

Browse files
committed
Add test_class_tokenize_identifer_not_equal
1 parent 0ed52bf commit c1c16de

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/test_rdoc_ruby_lex.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,5 +595,22 @@ def test_class_tokenize_constant_with_exclamation
595595
assert_equal expected, tokens
596596
end
597597

598+
def test_class_tokenize_identifer_not_equal
599+
tokens = RDoc::RubyLex.tokenize "foo!=bar\nfoo?=bar", nil
600+
601+
expected = [
602+
@TK::TkIDENTIFIER.new( 0, 1, 0, "foo"),
603+
@TK::TkNEQ .new( 3, 1, 3, "!="),
604+
@TK::TkIDENTIFIER.new( 5, 1, 5, "bar"),
605+
@TK::TkNL .new( 8, 1, 8, "\n"),
606+
@TK::TkFID .new( 9, 2, 0, "foo?"),
607+
@TK::TkASSIGN .new(13, 2, 4, "="),
608+
@TK::TkIDENTIFIER.new(14, 2, 5, "bar"),
609+
@TK::TkNL .new(17, 2, 9, "\n"),
610+
]
611+
612+
assert_equal expected, tokens
613+
end
614+
598615
end
599616

0 commit comments

Comments
 (0)