Skip to content

Commit 4a59c87

Browse files
committed
test against pausing
1 parent 09ab890 commit 4a59c87

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/test_frontend.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,14 @@ def test_build_tables():
2222
assert "lookup_table" in p.build(start).c
2323

2424

25-
25+
def test_pausing():
26+
# Ensure frotentend LoopChecker does not mark off against Pausing
27+
p = LLParse("lltest")
28+
s = p.node('start')
29+
s2 = p.node('start2')
30+
s.match('p', p.pause(1, 'parser was asked to pause').otherwise(s2)).skipTo(s)
31+
s2.match('p', p.pause(2, 'parser was asked to pause again').otherwise(s)).skipTo(s2)
32+
33+
p.build(s)
34+
35+

0 commit comments

Comments
 (0)