diff options
Diffstat (limited to 'runatest')
-rwxr-xr-x | runatest | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/runatest b/runatest new file mode 100755 index 0000000..1321026 --- /dev/null +++ b/runatest @@ -0,0 +1,21 @@ +#!/bin/bash + +set -eu +set -o pipefail + + +normalize() +{ + pandoc -f "html" -t json "$1" | jq . +} + + + +engine="$1" +wiki="$2" +html="$3" +output="$4" +diff="$5" + +"$engine" < "$wiki" > "$output" +diff -u <(normalize "$html") <(normalize "$output") > "$diff" |