diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | echo.md | 36 | ||||
-rw-r--r-- | echo.yaml | 17 | ||||
-rw-r--r-- | tomjon.md | 11 | ||||
-rw-r--r-- | tomjon.yaml | 3 |
5 files changed, 68 insertions, 0 deletions
@@ -1,2 +1,3 @@ /target **/*.rs.bk +*.pdf @@ -0,0 +1,36 @@ +--- +title: "**echo**(1) acceptance tests" +author: The Subplot project +bindings: echo.yaml +... + +Introduction +============================================================================= + +**echo**(1) is a Unix command line tool, which writes its command line +arguments to the standard output. This is a simple acceptance test +suite for the `/bin/echo` implementation. + +No arguments +============================================================================= + +Run `/bin/echo` without arguments. + +```subplot +when user runs echo without arguments +then exit code is 0 +and standard output contains a newline +and standard error is empty +``` + +Hello, world +============================================================================= + +This scenario runs `/bin/echo` to produce the output "hello, world". + +```subplot +when user runs echo with arguments hello, world +then exit code is 0 +and standard output contains "hello, world" +and standard error is empty +``` diff --git a/echo.yaml b/echo.yaml new file mode 100644 index 0000000..6937d3d --- /dev/null +++ b/echo.yaml @@ -0,0 +1,17 @@ +- when: user runs echo without arguments + function: run_echo_without_args + +- when: user runs echo with arguments (?P<args>.+) + function: run_echo_with_args + +- then: exit code is (?P<exit_code>\d+) + function: exit_code_is_zero + +- then: standard output contains a newline + function: stdout_is_a_newline + +- then: standard output contains "(?P<text>.*)" + function: stdout_is_text + +- then: standard error is empty + function: stderr_is_empty diff --git a/tomjon.md b/tomjon.md new file mode 100644 index 0000000..1ecbce5 --- /dev/null +++ b/tomjon.md @@ -0,0 +1,11 @@ +--- +title: "Tomjon" +author: The Subplot project +bindings: tomjon.yaml +... + +```subplot +given I am Tomjon +when I declare myself king +then there is applause +``` diff --git a/tomjon.yaml b/tomjon.yaml new file mode 100644 index 0000000..36371dc --- /dev/null +++ b/tomjon.yaml @@ -0,0 +1,3 @@ +- given: I am (?P<name>\S+) +- when: I declare myself king +- then: there is applause |