more list tests

This commit is contained in:
Paul Tagliamonte 2012-12-15 18:24:40 -05:00
parent 11fe591d38
commit a8c17db048

View File

@ -2,6 +2,7 @@ from hy.lex.tokenize import tokenize
def test_list_lex():
"""test basic lexing of lists"""
fn = tokenize("(fn [1 2 3 4])")[0]
assert fn == [
"fn", ["1", "2", "3", "4"]
@ -9,6 +10,7 @@ def test_list_lex():
def test_list_recurse():
""" test we can recurse lists """
fn = tokenize("(fn [1 2 3 4 [5 6 7]])")[0]
assert fn == [
"fn", ["1", "2", "3", "4", ["5", "6", "7"]]
@ -16,6 +18,7 @@ def test_list_recurse():
def test_double_rainbow():
""" DOUBLE LISTS """
fn = tokenize("(fn [1 2 3 4] [5 6 7])")[0]
assert fn == [
"fn", ["1", "2", "3", "4"], ["5", "6", "7"]