source/projects/calf/tests/python/test_reader.py

26 lines
449 B
Python
Raw Normal View History

2021-04-09 07:16:16 +00:00
"""
"""
from calf.reader import read_buffer
2021-05-31 18:28:46 +00:00
from conftest import parametrize
2021-04-09 07:16:16 +00:00
2021-05-15 17:34:32 +00:00
@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]",
],
)
2021-04-09 07:16:16 +00:00
def test_read(text):
assert list(read_buffer(text))