summaryrefslogtreecommitdiff
path: root/subplot.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-09-27 16:05:43 +0300
committerLars Wirzenius <liw@liw.fi>2020-09-28 10:24:14 +0300
commit5f05798c64c13576340046d0c8f58ca6b6978627 (patch)
tree249b7341ef04cefb14739d260226d5549800ea96 /subplot.md
parent19f27e688fcee990df0f29c8d9e073b6037dd445 (diff)
downloadsubplot-5f05798c64c13576340046d0c8f58ca6b6978627.tar.gz
fix(subplot.{md,py,yaml}): run Subplot binaries from the source tree
This is akin to installing them to a directory in PATH. Instead of doing that, we amend PATH so that the directory in the source tree with the binaries are in there. This adds a "given an installed subplot" step to every scenario that needs to run a Subplot binary.
Diffstat (limited to 'subplot.md')
-rw-r--r--subplot.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/subplot.md b/subplot.md
index 40550ef..b2c5ba5 100644
--- a/subplot.md
+++ b/subplot.md
@@ -663,6 +663,7 @@ program, and examining the output.
given file simple.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen simple.md -o simple.pdf
then file simple.pdf exists
when I run sp-docgen simple.md -o simple.html
@@ -690,6 +691,7 @@ combinations.
given file allkeywords.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen allkeywords.md -o foo.pdf
then file foo.pdf exists
when I run sp-codegen --run allkeywords.md -o test.py
@@ -726,6 +728,7 @@ but foobar was done
given file aliases.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen aliases.md -o aliases.html
then file aliases.html matches regex /given<[^>]*> precondition foo/
and file aliases.html matches regex /when<[^>]*> I do bar/
@@ -764,6 +767,7 @@ be continuing.
given file continuationmisuse.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen continuationmisuse.md -o foo.pdf
then file foo.pdf exists
when I try to run sp-codegen --run continuationmisuse.md -o test.py
@@ -798,6 +802,7 @@ This scenario verifies that empty lines in scenarios are ignored.
given file emptylines.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen emptylines.md -o emptylines.pdf
then file emptylines.pdf exists
when I run sp-docgen emptylines.md -o emptylines.html
@@ -893,6 +898,7 @@ failure_cleanup() {
given file cleanup-success-python.md
and file cleanup.yaml
and file cleanup.py
+and an installed subplot
when I run sp-codegen --run cleanup-success-python.md -o test.py
then scenario "Cleanup" was run
and step "given foo" was run, and then step "given bar"
@@ -924,6 +930,7 @@ given bar
given file cleanup-fail-python.md
and file cleanup.yaml
and file cleanup.py
+and an installed subplot
when I try to run sp-codegen --run cleanup-fail-python.md -o test.py
then scenario "Cleanup" was run
and step "given foo" was run, and then step "given bar"
@@ -956,6 +963,7 @@ given failure
given file cleanup-success-bash.md
and file cleanup.yaml
and file cleanup.sh
+and an installed subplot
when I run sp-codegen --run cleanup-success-bash.md -o test.sh
then scenario "Cleanup" was run
and step "given foo" was run, and then step "given bar"
@@ -989,6 +997,7 @@ called, in reverse order.
given file cleanup-fail-bash.md
and file cleanup.yaml
and file cleanup.sh
+and an installed subplot
when I try to run sp-codegen --run cleanup-fail-bash.md -o test.sh
then scenario "Cleanup" was run
and step "given foo" was run, and then step "given bar"
@@ -1028,6 +1037,7 @@ can be done using regular expressions.
given file simplepattern.md
and file simplepattern.yaml
and file capture.py
+and an installed subplot
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
@@ -1070,6 +1080,7 @@ being a regular expression pattern.
given file confusedpattern.md
and file confusedpattern.yaml
and file capture.py
+and an installed subplot
when I try to run sp-codegen --run confusedpattern.md -o test.py
then command fails
and stderr contains "simple pattern contains regex"
@@ -1100,6 +1111,7 @@ given I* am Tomjon
given file confusedbutok.md
and file confusedbutok.yaml
and file capture.py
+and an installed subplot
when I run sp-codegen --run confusedbutok.md -o test.py
then command is successful
~~~
@@ -1130,6 +1142,7 @@ given I* am Tomjon
given file regex.md
and file regex.yaml
and file capture.py
+and an installed subplot
when I run sp-codegen --run regex.md -o test.py
then scenario "Regex" was run
and step "given I am Tomjon" was run
@@ -1171,6 +1184,7 @@ programs that monitor the output file for changes.
given file simple.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen simple.md -o simple.pdf
then file simple.pdf exists
when I remember metadata for file simple.pdf
@@ -1185,6 +1199,7 @@ and only files simple.md, b.yaml, f.py, simple.pdf exist
given file simple.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen simple.md -o simple.pdf
then file simple.pdf exists
when I remember metadata for file simple.pdf
@@ -1199,6 +1214,7 @@ then file simple.pdf has changed from before
given file simple.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen simple.md -o simple.pdf
then file simple.pdf exists
when I remember metadata for file simple.pdf
@@ -1213,6 +1229,7 @@ then file simple.pdf has changed from before
given file simple.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-docgen simple.md -o simple.pdf
then file simple.pdf exists
when I remember metadata for file simple.pdf
@@ -1236,6 +1253,7 @@ higher level starts a new scenario.
given file scenarioislowest.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-codegen --run scenarioislowest.md -o test.py
then scenario "heading 1.1.1" was run
and command is successful
@@ -1264,6 +1282,7 @@ given precondition foo
given file subisnotnewscenario.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-codegen --run subisnotnewscenario.md -o test.py
then scenario "heading 1.1a" was run
and command is successful
@@ -1295,6 +1314,7 @@ given precondition foo
given file samelevelisnewscenario.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-codegen --run samelevelisnewscenario.md -o test.py
then scenario "heading 1.1.1" was run
and scenario "heading 1.1.2" was run
@@ -1330,6 +1350,7 @@ given precondition foo
given file higherisnewscenario.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-codegen --run higherisnewscenario.md -o test.py
then scenario "heading 1.1.1" was run
and scenario "heading 1.2" was run
@@ -1371,6 +1392,7 @@ ikiwiki, and ikiwiki has a different way of specifying page titles.
~~~scenario
given file notitle.md
+and an installed subplot
when I try to run sp-docgen notitle.md -o foo.md
then command fails
~~~
@@ -1397,6 +1419,7 @@ then bar was done
~~~scenario
given file notitle.md
+and an installed subplot
when I try to run sp-codegen --run notitle.md -o test.py
then command fails
~~~
@@ -1417,6 +1440,7 @@ chosen scenarios.
given file twoscenarios-python.md
and file b.yaml
and file f.py
+and an installed subplot
when I run sp-codegen twoscenarios-python.md -o test.py
and I run python3 test.py on
then scenario "One" was run
@@ -1457,6 +1481,7 @@ chosen scenarios.
given file twoscenarios-bash.md
and file b.yaml
and file f.sh
+and an installed subplot
when I run sp-codegen twoscenarios-bash.md -o test.sh
and I run bash test.sh on
then scenario "One" was run
@@ -1546,6 +1571,7 @@ specified.
~~~scenario
given file metadate.md
+and an installed subplot
when I run sp-docgen metadate.md -o metadate.html
then file metadate.html exists
and file metadate.html contains "<title>The Fabulous Title</title>"
@@ -1572,6 +1598,7 @@ This scenario tests that the `--date` command line option is used.
~~~scenario
given file dateless.md
+and an installed subplot
when I run sp-docgen dateless.md -o dateoption.html --date=FANCYDATE
then file dateoption.html exists
and file dateoption.html contains "<title>The Fabulous Title</title>"
@@ -1601,6 +1628,7 @@ modification time of the input file, and shall have the date in ISO
~~~scenario
given file dateless.md
and file dateless.md has modification time 2020-02-26 07:53:17
+and an installed subplot
when I run sp-docgen dateless.md -o mtime.html
then file mtime.html exists
and file mtime.html contains "<title>The Fabulous Title</title>"
@@ -1616,6 +1644,7 @@ missing file.
~~~scenario
given file missing-binding.md
+and an installed subplot
when I try to run sp-docgen missing-binding.md -o foo.htmlh
then command fails
and stderr contains ": missing-binding.yaml:"
@@ -1636,6 +1665,7 @@ missing file.
~~~scenario
given file missing-functions.md
and file b.yaml
+and an installed subplot
when I try to run sp-codegen --run missing-functions.md -o foo.py
then command fails
and stderr contains ": missing-functions.py:"
@@ -1676,6 +1706,7 @@ and file other.py
and file foo.bib
and file bar.bib
and file expected.json
+and an installed subplot
when I run sp-meta images.md
then stdout contains "source: images.md"
and stdout contains "source: b.yaml"
@@ -1793,6 +1824,7 @@ in a subplot.
~~~scenario
given file embedded.md
+and an installed subplot
when I run sp-docgen embedded.md -o foo.html
then file foo.html exists
and file foo.html matches regex /embedded\.txt/
@@ -1920,6 +1952,7 @@ This file does not end in a newline.
~~~scenario
given file onefiletwice.md
+and an installed subplot
when I try to run sp-docgen onefiletwice.md -o onefiletwice.html
then command fails
and file onefiletwice.html does not exist
@@ -1944,6 +1977,7 @@ This is another embedded file, and has the same name.
~~~scenario
given file casediff.md
+and an installed subplot
when I try to run sp-docgen casediff.md -o casediff.html
then command fails
and file casediff.html does not exist
@@ -2000,6 +2034,7 @@ then nothing works
```scenario
given file nobinding.md
and file badbindings.yaml
+and an installed subplot
when I try to run sp-codegen --run nobinding.md -o test.py
then command fails
```
@@ -2022,6 +2057,7 @@ given a capitalised binding
```scenario
given file casemismatch.md
and file badbindings.yaml
+and an installed subplot
when I try to run sp-codegen --run casemismatch.md -o test.py
then command fails
```
@@ -2044,6 +2080,7 @@ given a binding
```scenario
given file twobindings.md
and file badbindings.yaml
+and an installed subplot
when I try to run sp-codegen --run twobindings.md -o test.py
then command fails
```
@@ -2055,6 +2092,7 @@ The `sp-meta` command lists embedded files in its output.
~~~scenario
given file two-embedded.md
+and an installed subplot
when I run sp-meta two-embedded.md
then stdout contains "foo.txt"
and stdout contains "bar.yaml"
@@ -2096,6 +2134,7 @@ HTML output, not referenced as an external image.
~~~scenario
given file dot.md
and file b.yaml
+and an installed subplot
when I run pandoc --filter sp-filter dot.md -o dot.html
then file dot.html matches regex /img src="data:image/svg\+xml;base64,/
~~~
@@ -2137,6 +2176,7 @@ the HTML output, not referenced as an external image.
~~~scenario
given file plantuml.md
and file b.yaml
+and an installed subplot
when I run pandoc --filter sp-filter plantuml.md -o plantuml.html
then file plantuml.html matches regex /img src="data:image/svg\+xml;base64,/
~~~
@@ -2217,6 +2257,7 @@ HTML output, not referenced as an external image.
~~~scenario
given file roadmap.md
and file b.yaml
+and an installed subplot
when I run pandoc --filter sp-filter roadmap.md -o roadmap.html
then file roadmap.html matches regex /img src="data:image/svg\+xml;base64,/
~~~
@@ -2285,6 +2326,7 @@ as valid.
given file unknown-class-name.md
and file known-class-name.md
and file b.yaml
+and an installed subplot
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
@@ -2342,6 +2384,7 @@ what the input files are like.
~~~scenario
given file justdata.md
+and an installed subplot
when I run pandoc --filter sp-filter justdata.md -o justdata.html
then file justdata.html matches regex /does not have a YAML metadata/
~~~
@@ -2361,6 +2404,7 @@ It does not have a YAML metadata block.
~~~scenario
given file embedded-file.md
and file expected.txt
+and an installed subplot
when I run sp-extract embedded-file.md foo.txt -d .
then files foo.txt and expected.txt match
~~~