summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-06-03 08:26:54 +0300
committerLars Wirzenius <liw@liw.fi>2023-06-15 07:20:46 +0300
commit972ee09bb7d46d2688ef846ca912ac06a72674b4 (patch)
tree8f2369520f6dbabd6271c9798b4423817bca7222
parent09d99341aefcfca0a923445ba6ed0b298c6b1788 (diff)
downloadsubplot-972ee09bb7d46d2688ef846ca912ac06a72674b4.tar.gz
tests: re-enable reference subplot, test using Subplot 0.8.0
Rename the disabled reference.md to its proper name, and update it to match current Subplot, with YAML metadata in a separate file. Add "-t python" to subplot invocations, because subplot.subplot has both python and rust. The Python code doesn't have versioned dependencies on Subplot crates, which makes it easier to test here. Sponsored-by: author
-rw-r--r--reference.md (renamed from reference.md-disabled)34
-rw-r--r--reference.py6
-rw-r--r--reference.subplot16
3 files changed, 29 insertions, 27 deletions
diff --git a/reference.md-disabled b/reference.md
index 744b852..ab483c9 100644
--- a/reference.md-disabled
+++ b/reference.md
@@ -1,19 +1,18 @@
-
# Introduction
This document describes how we guard against accidental breaking
-changes in Subplot by running it against a curated set of subplot
-documents.
+changes in Subplot by running the current version against a curated
+set of subplot documents.
-# Subplot
+# Subplot version 0.8.0
## Produce HTML page
~~~scenario
given an installed subplot
-given a clone of https://gitlab.com/subplot/subplot.git in src at 96371571338767e776f7de583ddbea4512ceeba1
-when I docgen subplot.md to test.html, in src
-when I run, in src, subplot docgen subplot.md -o subplot.html
+given a clone of https://gitlab.com/subplot/subplot.git in src at 09d99341aefcfca0a923445ba6ed0b298c6b1788
+when I docgen subplot.subplot to test.html, in src
+when I run, in src, subplot docgen subplot.subplot -o subplot.html -t python
then file src/test.html exists
~~~
@@ -22,8 +21,8 @@ then file src/test.html exists
~~~scenario
given an installed subplot
given file run_test.sh
-given a clone of https://gitlab.com/subplot/subplot.git in src at 96371571338767e776f7de583ddbea4512ceeba1
-when I run, in src, subplot codegen subplot.md -o test-inner.py
+given a clone of https://gitlab.com/subplot/subplot.git in src at 09d99341aefcfca0a923445ba6ed0b298c6b1788
+when I run, in src, subplot codegen subplot.subplot -o test-inner.py -t python
when I run bash run_test.sh
then command is successful
~~~
@@ -52,20 +51,3 @@ fi
exit "$exit"
~~~
-
-
----
-title: Test Subplot against reference subplots
-author: The Subplot project
-bindings:
-- reference.yaml
-- subplot.yaml
-- lib/runcmd.yaml
-- lib/files.yaml
-impls:
- python:
- - reference.py
- - subplot.py
- - lib/files.py
- - lib/runcmd.py
-...
diff --git a/reference.py b/reference.py
index 69ad466..fa4b274 100644
--- a/reference.py
+++ b/reference.py
@@ -13,5 +13,9 @@ def docgen(ctx, filename=None, output=None, dirname=None):
runcmd_run = globals()["runcmd_run"]
runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
- runcmd_run(ctx, ["subplot", "docgen", filename, "--output", output], cwd=dirname)
+ runcmd_run(
+ ctx,
+ ["subplot", "docgen", filename, "--output", output, "-t", "python"],
+ cwd=dirname,
+ )
runcmd_exit_code_is_zero(ctx)
diff --git a/reference.subplot b/reference.subplot
new file mode 100644
index 0000000..4e3311c
--- /dev/null
+++ b/reference.subplot
@@ -0,0 +1,16 @@
+title: Test Subplot against reference subplots
+authors:
+- The Subplot project
+markdowns:
+- reference.md
+bindings:
+- reference.yaml
+- subplot.yaml
+- lib/runcmd.yaml
+- lib/files.yaml
+impls:
+ python:
+ - reference.py
+ - subplot.py
+ - lib/files.py
+ - lib/runcmd.py