2017-10-29 11:28:25 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import sys
|
2018-08-10 14:23:13 +02:00
|
|
|
from testrunner import run
|
2017-10-29 11:28:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
def testfunc(child):
|
|
|
|
child.expect('START')
|
|
|
|
for i in range(5):
|
|
|
|
child.expect_exact('<SCOPE {}{}>'
|
|
|
|
.format(i + 1, ' /' if i == 4 else ''))
|
|
|
|
|
|
|
|
child.expect_exact('Cleanup: <5>')
|
|
|
|
child.expect_exact('</SCOPE 4>')
|
|
|
|
child.expect_exact('</SCOPE 3>')
|
|
|
|
for i in (3, 2, 1):
|
|
|
|
child.expect_exact('Cleanup: <{}>'.format(i))
|
|
|
|
child.expect_exact('Result: 1234')
|
|
|
|
child.expect('SUCCESS')
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2017-12-12 22:40:03 +01:00
|
|
|
sys.exit(run(testfunc))
|