summaryrefslogtreecommitdiff
path: root/subplot.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-04-18 14:06:23 +0300
committerLars Wirzenius <liw@liw.fi>2020-04-19 15:28:48 +0300
commit30447917d785345dd99ee8cfe601b94ff413260c (patch)
tree998c237c45e10b3c752f94c6e26b1b44cc5e1231 /subplot.py
parent9f1bd185832c6e8acfafa6c66545a1921891da2e (diff)
downloadsubplot-30447917d785345dd99ee8cfe601b94ff413260c.tar.gz
Add: acceptance criteria for simple patterns
This adds scenarios for regex patterns capture and simple pattern capture from scenario steps, and additionally makes use of simple patterns everywhere possible in the examples.
Diffstat (limited to 'subplot.py')
-rw-r--r--subplot.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/subplot.py b/subplot.py
index 48320b6..6852411 100644
--- a/subplot.py
+++ b/subplot.py
@@ -66,6 +66,9 @@ def file_contains(ctx, filename=None, pattern=None):
content = f.read()
assert_eq(pattern in content, True)
+def function_got_arg(ctx, arg=None):
+ stdout_matches(ctx, '\nfunction got arg {}\n'.format(arg))
+
def scenario_was_run(ctx, name=None):
stdout_matches(ctx, '\nrunning scenario: {}\n'.format(name))