summaryrefslogtreecommitdiffstats
path: root/tests/test_commonmark/spec.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:23:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:23:02 +0000
commit943e3dc057eca53e68ddec51529bd6a1279ebd8e (patch)
tree61fb7bac619a56dfbcdcbdb7b0d4d6535fc36fe9 /tests/test_commonmark/spec.sh
parentInitial commit. (diff)
downloadmyst-parser-upstream.tar.xz
myst-parser-upstream.zip
Adding upstream version 0.18.1.upstream/0.18.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xtests/test_commonmark/spec.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_commonmark/spec.sh b/tests/test_commonmark/spec.sh
new file mode 100755
index 0000000..034fd86
--- /dev/null
+++ b/tests/test_commonmark/spec.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -e
+
+REPO="https://github.com/commonmark/CommonMark.git"
+VERSION="0.29"
+
+function main {
+ echo "Cloning from repo: $REPO..."
+ git clone --quiet $REPO
+
+ echo "Using version $VERSION..."
+ cd "CommonMark"
+ git checkout --quiet $VERSION
+
+ echo "Dumping tests file..."
+ python3 "test/spec_tests.py" --dump-tests > "../commonmark.json"
+
+ echo "Cleaning up..."
+ cd ..
+ rm -rf CommonMark
+
+ echo "Done."
+}
+
+main