AgeCommit message (Collapse)AuthorLines
Validate only pages that rendered in t0002Bryce Kwon-11/+26
test_url failed only on tidy's own errors, so a 404 or a 500 page in place of the stats or the blame page validated as well as the real one, and an empty body drew no more than warnings.
Let a test run require the tools it must not skipBryce Kwon-12/+14
Nothing could make a missing prerequisite fail. A host without pkg-config builds without Lua, and make test then passed with every Lua test skipped and the lua pass of t0201 never run. The whole-script skips become named prerequisites so the same list covers them, and the strace probe now traces the file class of calls the tests use, so an strace too old for it skips rather than fails.
Add the shared config writers and cgit_rcBryce Kwon-9/+2
The helpers are named by kind. cgitrc_repo and cgitrc_copy write the config file named first, and cgit_url, cgit_query and cgit_rc run cgit, each named after what it is handed first. A repository copies its defaults from the globals read before its repo.url, so cgitrc_repo places every setting itself, and a global can no longer land where it silently stops applying. The t00xx and t01xx files move to them here.
Correct the test comments that went staleBryce Kwon-1/+1
Trim the tidy check down to what it doesBryce Kwon-17/+3
Nothing sets NO_TIDY_WARNINGS, and a warning never fails the check, so the knob only quieted the output of a verbose run.
Drop the exit lines that follow test_doneBryce Kwon-2/+0
test_done ends the script on every path, skip_all included.
Test the hardening passBryce Kwon-2/+1
Clean up the whole treeBryce Kwon-2/+1
Trim the comments and dead code across the treeBryce Kwon-6/+4
Extend the html validity checksBryce Kwon-1/+26
Prefer POSIX forms throughout the test scriptsBryce Kwon-2/+1
Renumber the test scripts into themed rangesBryce Kwon-0/+0
The numbering walks outward from the ground the suite stands on. - t000x for the git version, html validity and the cache - t01xx for page content, one script per page - t02xx for filters, submodule links, dates and limits, which cut across pages - t03xx for defence, the security regressions and the $HOME promise - t04xx for the helper tools under tools/
Drop the Last-Modified, Expires and ETag headersBryce Kwon-1/+1
Tidy the test comments and shell portabilityBryce Kwon-10/+20
Rebuild the page chrome as semantic HTMLBryce Kwon-0/+11
The masthead, tab bar, breadcrumb, content region and footer were HTML tables, which cannot reflow and forced the page to scroll sideways on small screens. Class and id names are kept so custom themes keep matching.
tests/: Do not use `sed -i`Lukas Fleischer-2/+2
"-i" isn't part of the POSIX standard and doesn't work on several platforms such as OpenBSD. Use a temporary file instead. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
tests: use Git's test frameworkJohn Keeping-16/+15
This allows tests to run in parallel as well as letting us use "prove" or another TAP harness to run the tests. Git's test framework requires Git to be fully built before letting any tests run, so add a new target to the top-level Makefile which builds all of Git instead of just libgit.a and make the "test" target depend on that. Signed-off-by: John Keeping <john@keeping.me.uk>
tests/t0010-validate-html.sh: skip tests if 'tidy' is not availableLars Hjemli-1/+8
Noticed-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
t0010-validate.sh: return on cgit errorsLars Hjemli-1/+4
The earlier segfault in cgit passed by unnoticed by this test-script due to the pipe between cgit and sed. There might be a more elegant solution to this problem, but my shellscript- foo is weak. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Create initial testsuiteLars Hjemli-0/+31
This creates a simple testsuite, heavily inspired by the testsuite in git. Signed-off-by: Lars Hjemli <hjemli@gmail.com>