diff options
author | bptato <nincsnevem662@gmail.com> | 2024-04-21 21:26:27 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-04-21 21:28:45 +0200 |
commit | e3d9ee2c6224cd30bf56e24f7988899e0e3985c1 (patch) | |
tree | 31116d7d751d058f32bf43313c12673423e8d8be /test/layout/run_layout_tests.sh | |
parent | ba88f015ea500bcc574b621392c721ef2c9dbcd0 (diff) | |
download | chawan-e3d9ee2c6224cd30bf56e24f7988899e0e3985c1.tar.gz |
test: add js & layout tests
(Sadly some layout tests still fail.)
Diffstat (limited to 'test/layout/run_layout_tests.sh')
-rwxr-xr-x | test/layout/run_layout_tests.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/layout/run_layout_tests.sh b/test/layout/run_layout_tests.sh new file mode 100755 index 00000000..03c9c818 --- /dev/null +++ b/test/layout/run_layout_tests.sh @@ -0,0 +1,23 @@ +#!/bin/sh +if test -z "$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" + expected="$(basename "$h" .html).expected" + color_expected="$(basename "$h" .html).color.expected" + if test -f "$expected" + then if ! "$CHA_TEST_BIN" -C config.toml "$h" | diff "$expected" - + then failed=$(($failed+1)) + printf 'FAIL: %s\n' "$h" + fi + elif test -f "$color_expected" + then if ! "$CHA_TEST_BIN" -C config.color.toml "$h" | diff "$color_expected" - + then failed=$(($failed+1)) + printf 'FAIL: %s\n' "$h" + fi + else printf 'WARNING: expected file not found for %s\n' "$h" + fi +done +exit "$failed" |