Markdown Shell Recorder: Reformat ReadMe
@@ -39,24 +39,24 @@ to the standard output. The second command in our test (`kdb rm /tests/markdown/
are no special comments below the command, the Markdown Shell Recorder still checks the exit code of the command and reports a failure if
it is not `0`. If we expect another exit code we can use the special comment `# RET:` to specify the return code. This is what we did after
the third command, which will fail with exit code `1`, since it tries to delete a non-existing key. The Shell Recorder also checks the
-value the last command prints to the standard error output since, we specified the expected text `Did not find the key` via the special
+value the last command prints to the standard error output, since we specified the expected text `Did not find the key` via the special
comment `# STDERR:`.
-## Add a test
+## Add a Test
-If you want to add a Markdown Shell Recorder tests for the README.md of your plugin, you can simply pass
+If you want to add a Markdown Shell Recorder tests for the `README.md` of your plugin, you can simply pass
`TEST_README` as argument to `add_plugin`.
To add other Markdown Shell Recorder tests for a certain Markdown file (such as an tutorial), use the CMake function `add_msr_test`:
-```
+```cmake
add_msr_test (name file)
```
-> Note that test cases executed with `add_msr_test` use the root of the source code repository as current working directory.
+. Note that test cases executed with `add_msr_test` use the **root of the source code repository as current working directory**.
-`add_msr_test` also supports `REQUIRED_PLUGINS` which allows you to specify which plugins need to be present in order to
-run the Markdown Shell Recorder test.
+The function `add_msr_test` also supports the argument `REQUIRED_PLUGINS` which allows you to specify which plugins need to be present in
+order to run the Markdown Shell Recorder test.
If one of the specified plugins is missing, the test will not be added.
For example:
@@ -68,8 +68,6 @@ add_msr_test (tutorial_validation "${CMAKE_SOURCE_DIR}/doc/tutorials/validation.
adds the [validation tutorial](/doc/tutorials/validation.md) as Markdown Shell Recorder test and requires the plugin `validation` to be present.
If the plugin is missing, the test will not be added.
-
-
## Syntax
### Commands
@@ -127,7 +125,7 @@ For examples, please take a look at a the ReadMe of plugins such as [YAMLCPP](/s
If a test case fails, a detailed protocol will be printed by the Shell Recorder.
By default `ctest` suppresses all output.
-To get the output, use `-V` or `--output-on-failure`.
+To print the output, use `-V` or `--output-on-failure`.
(`-V` additionally prints the executed command but does so for every executed test.)
### Interactive Debugging
@@ -137,20 +135,21 @@ This feature requires you to use either use
- `ctest --interactive-debug-mode 1` (with some limitations: you do not see what you type), or
- run the shell recorder directly, which can be done using (~e is the path to an Elektra checkout)
- ```
+
+ ```bash
cd build
. ~e/scripts/run_dev_env
tests/shell/shell_recorder/tutorial_wrapper/markdown_shell_recorder.sh path/to/file.md
```
-Once you started the Shell Recorder in either of these ways, you can simply use
+. Once you started the Shell Recorder in either of these ways, you can simply use
```
interactive
```
as command to drop into a shell.
-To drop out of the shell type `ctrl+D` or use `exit`.
+To drop out of the shell type `ctrl`+`D` or use `exit`.
By default `$SHELL` is used but you can also select the shell via an argument to `interactive`.
Note that the chosen shell needs to support `-i /dev/tty` as arguments.
