Strip tex and matlab leading inline comments

This commit is contained in:
Joshua Peek
2012-06-21 10:38:28 -05:00
parent 4b9b8a5058
commit 497da86262
3 changed files with 135 additions and 203 deletions

View File

@@ -36,6 +36,7 @@ class TestTokenizer < Test::Unit::TestCase
assert_equal %w(foo /* */), tokenize("foo /* \nComment\n */")
assert_equal %w(foo <!-- -->), tokenize("foo <!-- Comment -->")
assert_equal %w(foo {- -}), tokenize("foo {- Comment -}")
assert_equal %w(% %), tokenize("2 % 10\n% Comment")
end
def test_sgml_tags
@@ -53,6 +54,7 @@ class TestTokenizer < Test::Unit::TestCase
assert_equal %w(-), tokenize("1 - 1")
assert_equal %w(*), tokenize("1 * 1")
assert_equal %w(/), tokenize("1 / 1")
assert_equal %w(%), tokenize("2 % 5")
assert_equal %w(&), tokenize("1 & 1")
assert_equal %w(&&), tokenize("1 && 1")
assert_equal %w(|), tokenize("1 | 1")