aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-07-20 15:06:21 -0500
committerJoshua Peek <josh@joshpeek.com>2012-07-20 15:06:21 -0500
commit175d4244c2f4848f6e4d50af6c5cd45337490134 (patch)
tree48cbbdea0243db9af63ee858dacb494c1fb6d4a9 /test
parentd063089430491fa6398ecebbe0ef7936634f34ea (diff)
Extract single and multi line comment parser
Diffstat (limited to 'test')
-rw-r--r--test/test_tokenizer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_tokenizer.rb b/test/test_tokenizer.rb
index e757c7d..bbd4387 100644
--- a/test/test_tokenizer.rb
+++ b/test/test_tokenizer.rb
@@ -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 -->")