mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Extract single and multi line comment parser
This commit is contained in:
@@ -29,9 +29,9 @@ class TestTokenizer < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_skip_comments
|
||||
assert_equal %w(foo #), tokenize("foo # Comment")
|
||||
assert_equal %w(foo # bar), tokenize("foo # Comment\nbar")
|
||||
assert_equal %w(foo //), tokenize("foo // Comment")
|
||||
assert_equal %w(foo #), tokenize("foo\n# Comment")
|
||||
assert_equal %w(foo # bar), tokenize("foo\n# Comment\nbar")
|
||||
assert_equal %w(foo //), tokenize("foo\n// Comment")
|
||||
assert_equal %w(foo /* */), tokenize("foo /* Comment */")
|
||||
assert_equal %w(foo /* */), tokenize("foo /* \nComment\n */")
|
||||
assert_equal %w(foo <!-- -->), tokenize("foo <!-- Comment -->")
|
||||
|
||||
Reference in New Issue
Block a user