about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup.sh2
-rwxr-xr-xtests/t0010-validate-html.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/setup.sh b/tests/setup.sh
index 95acb54..30f90d5 100755
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -113,7 +113,7 @@ run_test()
 	then
 		printf " %2d) %-60s [ok]\n" $test_count "$desc"
 	else
-		((test_failed++))
+		test_failed=$(expr $test_failed + 1)
 		printf " %2d) %-60s [failed]\n" $test_count "$desc"
 	fi
 }
diff --git a/tests/t0010-validate-html.sh b/tests/t0010-validate-html.sh
index 94aa52b..3fe4800 100755
--- a/tests/t0010-validate-html.sh
+++ b/tests/t0010-validate-html.sh
@@ -9,7 +9,7 @@ test_url()
 	test -z "$NO_TIDY_WARNINGS" || tidy_opt+=" --show-warnings no"
 	cgit_url "$1" >trash/tidy-$test_count || return
 	sed -ie "1,4d" trash/tidy-$test_count || return
-	tidy $tidy_opt trash/tidy-$test_count
+	"$tidy" $tidy_opt trash/tidy-$test_count
 	rc=$?
 
 	# tidy returns with exitcode 1 on warnings, 2 on error
@@ -23,6 +23,13 @@ test_url()
 
 prepare_tests 'Validate html with tidy'
 
+tidy=`which tidy`
+test -n "$tidy" || {
+	echo "Skipping tests: tidy not found"
+	tests_done
+	exit
+}
+
 run_test 'index page' 'test_url ""'
 run_test 'foo' 'test_url "foo"'
 run_test 'foo/log' 'test_url "foo/log"'
2020-03-08Add The Stone SkyJune McEnroe 2020-03-08Publish "How I Relay Chat"June McEnroe 2020-03-03Don't use $ inside $(())June McEnroe 2020-03-03Remove setoptJune McEnroe 2020-03-03Use getopts in shell scriptsJune McEnroe 2020-02-27Style %T outside of Rs in italicJune McEnroe 2020-02-26Add Fierce Femmes and Notorious LiarsJune McEnroe 2020-02-23Add This Is How You Lose the Time WarJune McEnroe 2020-02-22Add See Ya LaterJune McEnroe 2020-02-20Remove wiki scriptJune McEnroe 2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe 2020-01-28Change scout sensitivity to 1.4June McEnroe 2020-01-28Import shows.txtJune McEnroe