source/projects/calf/tests/python/test_reader.py
2021-05-15 11:34:32 -06:00

26 lines
450 B
Python

"""
"""
from conftest import parametrize
from calf.reader import read_buffer
@parametrize(
"text",
[
"()",
"[]",
"[[[[[[[[[]]]]]]]]]",
"{1 {2 {}}}",
'"foo"',
"foo",
"'foo",
"^foo bar",
"^:foo bar",
"{\"foo\" '([:bar ^:foo 'baz 3.14159e0])}",
"[:foo bar 'baz lo/l, 1, 1.2. 1e-5 -1e2]",
],
)
def test_read(text):
assert list(read_buffer(text))