diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-08-14 09:49:17 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-09-07 17:32:20 +0100 |
commit | 4436b7ee28b0318a96d98833d85d712c8a18850d (patch) | |
tree | ca8c124284b7585b310fa4340d6a63be498ccba6 /examples | |
parent | 70461d3af84d1f5363df67f2f50f10b9dce86812 (diff) | |
download | subplot-4436b7ee28b0318a96d98833d85d712c8a18850d.tar.gz |
bindings: Parse polyglot bindings
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/echo/echo.yaml | 24 | ||||
-rw-r--r-- | examples/muck/muck.yaml | 52 | ||||
-rw-r--r-- | examples/website/website.yaml | 17 |
3 files changed, 69 insertions, 24 deletions
diff --git a/examples/echo/echo.yaml b/examples/echo/echo.yaml index 7be6e96..bcbdf87 100644 --- a/examples/echo/echo.yaml +++ b/examples/echo/echo.yaml @@ -1,20 +1,32 @@ - when: user runs echo without arguments - function: run_echo_without_args + impl: + bash: + function: run_echo_without_args - when: user runs echo with arguments (?P<args>.+) - function: run_echo_with_args + impl: + bash: + function: run_echo_with_args regex: true - then: exit code is (?P<exit_code>\d+) - function: exit_code_is + impl: + bash: + function: exit_code_is regex: true - then: standard output contains a newline - function: stdout_is_a_newline + impl: + bash: + function: stdout_is_a_newline - then: standard output contains "(?P<text>.*)" - function: stdout_is_text + impl: + bash: + function: stdout_is_text regex: true - then: standard error is empty - function: stderr_is_empty + impl: + bash: + function: stderr_is_empty diff --git a/examples/muck/muck.yaml b/examples/muck/muck.yaml index 21fe303..10f67ee 100644 --- a/examples/muck/muck.yaml +++ b/examples/muck/muck.yaml @@ -1,47 +1,73 @@ - given: "a fresh Muck server" - function: fixme + impl: + python: + function: fixme - given: "I am {name}" - function: fixme + impl: + python: + function: fixme - given: "I am {name}, with super capability" - function: fixme + impl: + python: + function: fixme - when: "I do POST /res with (?P<json>\\{.*\\})" - function: fixme + impl: + python: + function: fixme regex: true - when: "I do PUT /res with Muck-Id: \\{(?P<id>\\S+)\\}, Muck-Revision: \\{(?P<rev>\\S+)\\}, and body (?P<json>\\{.*\\})" - function: fixme + impl: + python: + function: fixme regex: true - when: "I do GET /res with Muck-Id: \\{(?P<id>\\S+)\\}" - function: fixme + impl: + python: + function: fixme regex: true - when: "I do DELETE /res with Muck-Id: \\{(?P<id>\\S+)\\}" - function: fixme + impl: + python: + function: fixme regex: true - when: "I restart Muck" - function: fixme + impl: + python: + function: fixme regex: true - then: "response code is (?P<code>\\d+)" - function: fixme + impl: + python: + function: fixme regex: true - then: "header {header} is {name}" - function: fixme + impl: + python: + function: fixme - then: "header (?P<header>\\S+) matches \\{(?P<name>\\S+)\\}" - function: fixme + impl: + python: + function: fixme regex: true - then: "body matches (?P<json>\\{.*\\})" - function: fixme + impl: + python: + function: fixme regex: true - then: "revisions \\{(?P<rev1>\\S+)\\} and \\{(?P<rev2>\\S+)\\} are different" - function: fixme + impl: + python: + function: fixme regex: true diff --git a/examples/website/website.yaml b/examples/website/website.yaml index 401b16e..a3afc1b 100644 --- a/examples/website/website.yaml +++ b/examples/website/website.yaml @@ -1,12 +1,19 @@ - given: website {url} - function: remember_url + impl: + python: + function: remember_url - when: I look at the front page - function: fetch_url + impl: + python: + function: fetch_url - then: it mentions "{text:text}" - function: page_contains + impl: + python: + function: page_contains - then: it doesn't contain "{text:text}" - function: page_doesnt_contain - + impl: + python: + function: page_doesnt_contain |