Skip to content

Commit e15c22d

Browse files
committed
🧪 TESTS: Simplify grabbing the common mark specifications
1 parent 860f0b7 commit e15c22d

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

tests/test_cmark_spec/spec.sh

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

3-
set -e
3+
set -eux
44

5-
REPO="https://github.com/commonmark/CommonMark.git"
65
VERSION="0.30"
6+
URL="https://spec.commonmark.org/$VERSION/spec.json"
77

8-
function main {
9-
echo "Cloning from repo: $REPO..."
10-
git clone --quiet $REPO
11-
12-
echo "Using version $VERSION..."
13-
cd "CommonMark"
14-
git checkout --quiet $VERSION
15-
16-
echo "Dumping tests file..."
17-
python3 "test/spec_tests.py" --dump-tests > "../commonmark.json"
18-
19-
echo "Cleaning up..."
20-
cd ..
21-
rm -rf CommonMark
22-
23-
echo "Done."
24-
}
25-
26-
main
8+
curl -sL "$URL" -o "commonmark.json"

0 commit comments

Comments
 (0)