diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-27 12:52:04 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-28 10:24:14 +0300 |
commit | 19f27e688fcee990df0f29c8d9e073b6037dd445 (patch) | |
tree | 3fae194b3c05e82f7a4cef861f84aff99b3d66d2 /subplot.md | |
parent | 0763dc1425e4c7a9c9257c5806a4f120b4c06a64 (diff) | |
download | subplot-19f27e688fcee990df0f29c8d9e073b6037dd445.tar.gz |
refactor(subplot.{md,yaml}): rename steps to check output
The old steps "then output matches /.../" and "stderr matches /.../"
come originally from runcmd.yaml. For lib/runcmd.yaml they have been
replaced with 'then stdout contains "..."' and 'stderr contains
"..."'.
Change all uses of the old wording to the new one. Don't use
lib/runcmd.yaml yet, but keep the binding subplot.yaml to bind the new
wording to the function from lib/runcmd.py (which it did before
already, so no change).
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -1031,7 +1031,7 @@ and file capture.py when I run sp-codegen --run simplepattern.md -o test.py then scenario "Simple pattern" was run and step "given I am Tomjon" was run -and output matches /function got argument name as Tomjon/ +and stdout contains "function got argument name as Tomjon" and command is successful ~~~ @@ -1072,7 +1072,7 @@ and file confusedpattern.yaml and file capture.py when I try to run sp-codegen --run confusedpattern.md -o test.py then command fails -and stderr matches /simple pattern contains regex/ +and stderr contains "simple pattern contains regex" ~~~ ~~~~{#confusedpattern.md .file .markdown .numberLines} @@ -1133,7 +1133,7 @@ and file capture.py when I run sp-codegen --run regex.md -o test.py then scenario "Regex" was run and step "given I am Tomjon" was run -and output matches /function got argument name as Tomjon/ +and stdout contains "function got argument name as Tomjon" and command is successful ~~~ @@ -1618,7 +1618,7 @@ missing file. given file missing-binding.md when I try to run sp-docgen missing-binding.md -o foo.htmlh then command fails -and stderr matches /: missing-binding.yaml:/ +and stderr contains ": missing-binding.yaml:" ~~~ ~~~{#missing-binding.md .file .markdown .numberLines} @@ -1638,7 +1638,7 @@ given file missing-functions.md and file b.yaml when I try to run sp-codegen --run missing-functions.md -o foo.py then command fails -and stderr matches /: missing-functions.py:/ +and stderr contains ": missing-functions.py:" ~~~ ~~~{#missing-functions.md .file .markdown .numberLines} @@ -1677,17 +1677,17 @@ and file foo.bib and file bar.bib and file expected.json when I run sp-meta images.md -then output matches /source: images.md/ -and output matches /source: b.yaml/ -and output matches /source: other.yaml/ -and output matches /source: f.py/ -and output matches /source: other.py/ -and output matches /source: foo.bib/ -and output matches /source: bar.bib/ -and output matches /source: image.gif/ -and output matches /bindings: b.yaml/ -and output matches /bindings: other.yaml/ -and output matches /functions: f.py/ +then stdout contains "source: images.md" +and stdout contains "source: b.yaml" +and stdout contains "source: other.yaml" +and stdout contains "source: f.py" +and stdout contains "source: other.py" +and stdout contains "source: foo.bib" +and stdout contains "source: bar.bib" +and stdout contains "source: image.gif" +and stdout contains "bindings: b.yaml" +and stdout contains "bindings: other.yaml" +and stdout contains "functions: f.py" when I run sp-meta images.md -o json then JSON output matches expected.json ~~~ @@ -2056,8 +2056,8 @@ The `sp-meta` command lists embedded files in its output. ~~~scenario given file two-embedded.md when I run sp-meta two-embedded.md -then output matches /foo.txt/ -and output matches /bar.yaml/ +then stdout contains "foo.txt" +and stdout contains "bar.yaml" ~~~ ~~~~~~{#two-embedded.md .file .markdown .numberLines} @@ -2288,7 +2288,7 @@ and file b.yaml when I try to run sp-docgen unknown-class-name.md -o unknown-class-name.html then command fails and file unknown-class-name.html does not exist -and stderr matches /Unknown classes found in the document: foobar/ +and stderr contains "Unknown classes found in the document: foobar" when I run sp-docgen known-class-name.md -o known-class-name.html then file known-class-name.html exists ~~~ |