diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-27 10:10:56 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-28 10:24:14 +0300 |
commit | 6a19cfed49ecd556d24674811fd9e95793f7e262 (patch) | |
tree | 91f3eae8c6586bd3c4b3a2b5fab99db2b95ff0cc /subplot.yaml | |
parent | 64345866b3d0fdd9a8835cf1fac88f7db456322e (diff) | |
download | subplot-6a19cfed49ecd556d24674811fd9e95793f7e262.tar.gz |
refactor(subplot.{md,py,yaml}): use step functions from lib/runcmd.py
Use the Python functions from lib/runcmd.py instead of the ones from
./runcmd.py.
This changes some bindings in subplot.yaml to use functions from
lib/runcmd.py, and changes some step functions in subplot.py to be
defined in terms of functions in lib/runcmd.py. The actual steps in
subplot.md are not changed and no bindings from lib/runcmd.yaml are
yet used.
Some bindings that used to come from runcmd.yaml are here added to
subplot.yaml. This is temporary change that will be undone later by
replacing those bindings with ones from lib/runcmd.yaml, but doing
that in this commit would make it bigger and harder to follow.
Diffstat (limited to 'subplot.yaml')
-rw-r--r-- | subplot.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/subplot.yaml b/subplot.yaml index 0b63302..9131a02 100644 --- a/subplot.yaml +++ b/subplot.yaml @@ -70,3 +70,17 @@ - then: "{filename} ends in two newlines" function: file_ends_in_two_newlines + +- then: program finished successfully + function: runcmd_exit_code_is_zero + +- then: exit code is non-zero + function: runcmd_exit_code_is_nonzero + +- then: output matches /(?P<text>.+)/ + function: runcmd_stdout_contains + regex: true + +- then: stderr matches /(?P<text>.+)/ + function: runcmd_stderr_contains + regex: true |