Add regression test for #382

This commit is contained in:
Nicolas Dandrimont 2014-01-02 03:13:49 +01:00
parent a44e53f4de
commit c1d5948d73

View File

@ -260,3 +260,9 @@ def test_reader_macro():
assert entry[0][0] == HySymbol("dispatch_reader_macro")
assert entry[0][1] == HyExpression([HySymbol("quote"), HyString("^")])
assert len(entry[0]) == 3
def test_lex_comment_382():
"""Ensure that we can tokenize sources with a comment at the end"""
entry = tokenize("foo ;bar\n;baz")
assert entry == [HySymbol("foo")]