From c90fdd956dcf119c658bfe1e25ae2851e7c6836f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 Aug 2019 13:51:37 +0200 Subject: Add: first draft of test scripts --- runatest | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 runatest (limited to 'runatest') 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" -- cgit v1.2.1