summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-01-10 08:25:13 +0200
committerLars Wirzenius <liw@liw.fi>2020-01-10 08:25:13 +0200
commit5003c7b5113017ea8b6678f0277050088de9c852 (patch)
treecccf957d0bf27c46b453c781ef0f4d2ffd30a694 /check
parentef76f6751d0758afef256dca8e7c538c8de4f1b6 (diff)
downloadsubplot-5003c7b5113017ea8b6678f0277050088de9c852.tar.gz
Add: script to test all examples
Diffstat (limited to 'check')
-rwxr-xr-xcheck22
1 files changed, 22 insertions, 0 deletions
diff --git a/check b/check
new file mode 100755
index 0000000..0446117
--- /dev/null
+++ b/check
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -eu
+
+if false; then
+cargo clippy -q
+cargo test -q
+
+find src -type f -name '*.rs' -exec rustfmt --check '{}' +
+fi
+
+codegen() {
+ cargo run -q --bin sp-codegen -- "$1" --output "$2" --run \
+ --templates "$(pwd)/templates"
+}
+
+for md in *.md
+do
+ echo "$md ====================================="
+ codegen "$md" test.py
+ echo
+done