Commit da74497b authored by eckhart's avatar eckhart

parse.py: ensure cache neutrality for retrieved values

parent 09995eb3
......@@ -873,26 +873,29 @@ class TestPopRetrieve:
# set_tracer(gr, trace_history)
st = gr(case)
# log_parsing_history(gr, 'test_cache_neutrality_2')
# print(st.as_sxpr())
assert not st.errors
assert str(st) == "AXX!"
# print(st.as_sxpr())
def test_cache_neutrality_3(selfself):
lang = r'''document = variantA | variantB
variantA = delimiter `X` check ::delimiter `!`
variantB = `A` delimiter check ::delimiter `!`
variantA = delimiter `X` [`---`] check ::delimiter `!`
variantB = `A` delimiter [`---`] check ::delimiter `!`
check = :delimiter
delimiter = `A` | `X`
'''
gr = grammar_provider(lang)()
case = 'AXXX!'
case = 'AX---XX!'
# set_config_value('history_tracking', True)
# start_logging('LOGS')
# set_tracer(gr, trace_history)
st = gr(case)
# log_parsing_history(gr, 'test_cache_neutrality_3')
assert not st.errors
# print(st.as_sxpr())
assert not st.errors
case = 'AXXX!'
st = gr(case)
assert not st.errors
def test_single_line(self):
teststr = "Anfang ```code block `` <- keine Ende-Zeichen ! ``` Ende"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment