Merge pull request #1604 from geoff-codes/#!--"

Comment styles; don't choke on `#!/usr/bin/env foo=bar`
This commit is contained in:
Arfon Smith
2015-04-01 15:18:40 -05:00
6 changed files with 1520 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ class TestTokenizer < Minitest::Test
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\n-- Comment")
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 -->")