Exemple #1
0
def test_lex_comment():
    assert lex("1; foo\n2") == lex("1\n2")
    assert lex('; 1') == lex('')
    assert lex(';') == lex('')
Exemple #2
0
def test_lex_unquotes():
    assert lex("~x") == ['~', 'x']
    assert lex("~@x") == ['~@', 'x']
Exemple #3
0
def test_lex():
    assert lex("(1, 2)") == ['(', '1', '2', ')']