summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-06-01 22:00:48 +0300
committerLars Wirzenius <liw@liw.fi>2019-06-01 22:00:48 +0300
commit082c01bcb2234004d48f99c82d2b0c2570023136 (patch)
treeba2cefa9543d8c8201434555c24095f28e75fb40
parentf018f576993c86a73f0a730ffa56e67e328c7aaf (diff)
downloadfable-poc-082c01bcb2234004d48f99c82d2b0c2570023136.tar.gz
Add: a second scenario
-rwxr-xr-xftt-codegen8
1 files changed, 5 insertions, 3 deletions
diff --git a/ftt-codegen b/ftt-codegen
index 7e01553..ef6e3b9 100755
--- a/ftt-codegen
+++ b/ftt-codegen
@@ -144,11 +144,13 @@ for s in fable.get_scenarios():
if not s.is_empty():
scenarios.append(s)
+f = sys.stdout
for s in scenarios:
- debug('scenario: {}'.format(s.get_name()))
+ name = s.get_name()
+ debug('scenario: {}'.format(name))
for step in s.get_steps():
debug(' step: {}'.format(step))
- codegen(sys.stdout, step, bindings)
- sys.stdout.write('print("OK")\n')
+ codegen(f, step, bindings)
+ f.write('print("OK: %s" % "{}")\n'.format(name))
debug('ok')