about summary refs log tree commit diff
path: root/tests/t0010-validate-html.sh
blob: ca08d69d142b216d14ab1c7773c9e18de2052740 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

test_description='Validate html with tidy'
. ./setup.sh


test_url()
{
	tidy_opt="-eq"
	test -z "$NO_TIDY_WARNINGS" || tidy_opt+=" --show-warnings no"
	cgit_url "$1" >tidy-$test_count.tmp || return
	sed -e "1,4d" tidy-$test_count.tmp >tidy-$test_count || return
	"$tidy" $tidy_opt tidy-$test_count
	rc=$?

	# tidy returns with exitcode 1 on warnings, 2 on error
	if test $rc = 2
	then
		false
	else
		:
	fi
}

tidy=`which tidy 2>/dev/null`
test -n "$tidy" || {
	skip_all='Skipping html validation tests: tidy not found'
	test_done
	exit
}

test_expect_success 'index page' 'test_url ""'
test_expect_success 'foo' 'test_url "foo"'
test_expect_success 'foo/log' 'test_url "foo/log"'
test_expect_success 'foo/tree' 'test_url "foo/tree"'
test_expect_success 'foo/tree/file-1' 'test_url "foo/tree/file-1"'
test_expect_success 'foo/commit' 'test_url "foo/commit"'
test_expect_success 'foo/diff' 'test_url "foo/diff"'

test_done
Add make lexerJune McEnroe This is kind of a mess and needs to be cleaned up against more careful reading of the make grammar. 2020-12-29Clean up C lexerJune McEnroe This ordering of rules feels much cleaner. 2020-12-29Clean up hilex code somewhatJune McEnroe 2020-12-29Match lex/yacc %% %{ %} lines as MacroJune McEnroe 2020-12-29Match top-level C definitions as IdentifierTagJune McEnroe 2020-12-29Match C type declarations as IdentifierTagJune McEnroe 2020-12-29Match function-like macro definitions as IdentifierTagJune McEnroe 2020-12-29Reconfigure C macro start conditionsJune McEnroe 2020-12-29Document HTML class namesJune McEnroe 2020-12-29Rename Tag class to IdentifierTagJune McEnroe 2020-12-29Change HTML class from hi to hilexJune McEnroe You can tell I was just copying the HTML code huh. 2020-12-29Add hilex HTML outputJune McEnroelspan='3' class='logmsg'> 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe