about summary refs log tree commit diff stats
path: root/test/js/run_js_tests.sh
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-21 21:26:27 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-21 21:28:45 +0200
commite3d9ee2c6224cd30bf56e24f7988899e0e3985c1 (patch)
tree31116d7d751d058f32bf43313c12673423e8d8be /test/js/run_js_tests.sh
parentba88f015ea500bcc574b621392c721ef2c9dbcd0 (diff)
downloadchawan-e3d9ee2c6224cd30bf56e24f7988899e0e3985c1.tar.gz
test: add js & layout tests
(Sadly some layout tests still fail.)
Diffstat (limited to 'test/js/run_js_tests.sh')
-rwxr-xr-xtest/js/run_js_tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/js/run_js_tests.sh b/test/js/run_js_tests.sh
new file mode 100755
index 00000000..a8cad435
--- /dev/null
+++ b/test/js/run_js_tests.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+if ! test "$CHA_TEST_BIN"
+then	test -f ../../../cha && CHA_TEST_BIN=../../../cha || CHA_TEST_BIN=cha
+fi
+failed=0
+for h in *.html
+do	printf '%s\n' "$h"
+	if ! "$CHA_TEST_BIN" -C config.toml "$h" | diff all.expected -
+	then	failed=$(($failed+1))
+		printf 'FAIL: %s\n' "$h"
+	fi
+done
+exit "$failed"