diff options
Diffstat (limited to 'tests/test_cmark_spec/spec.sh')
-rwxr-xr-x | tests/test_cmark_spec/spec.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_cmark_spec/spec.sh b/tests/test_cmark_spec/spec.sh new file mode 100755 index 0000000..c851390 --- /dev/null +++ b/tests/test_cmark_spec/spec.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e + +REPO="https://github.com/commonmark/CommonMark.git" +VERSION="0.30" + +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 |