AgeCommit message (Collapse)AuthorLines
Share the rename fixture of the diff pagesBryce Kwon-10/+1
Each repository is built tree for tree as before. A helper that lost the caller's change would still fail t0107, where following no path shows file-1, but t0108 passed without its added line, so it now looks for that line.
Check the rest of what the diff page printsBryce Kwon-14/+74
Nothing checked a deleted file, a change of mode, a binary file, a submodule, a path, a range between two commits or the root commit on the HTML page, nor the 404 a revision that is no commit gets. The first checks were steps titled as actions that read one page in turn, so each now fetches its own.
Keep a followed diff to the path it namesBryce Kwon-0/+27
A followed diff kept every path that started with the requested one, so following small.c took small.cpp in as well. A path now has to be the requested one or lie below it, as the pathspec of an unfollowed diff matches.
Test the diff options a request or config setsBryce Kwon-0/+94
None of dt=2, ignorews, context and its cap, side-by-side-diffs or rename-limit had a test anywhere in the suite, nor the 0 that the MANUAL says lifts the rename limit.
Check what each side-by-side cell holdsBryce Kwon-18/+106
The span checks compared page totals, so a span on the wrong side or over the wrong characters passed while the totals agreed. A fill that read cells a longer pair left behind passed as well, since only a literal pair after a longer one shows it. Nothing checked the cell classes the forced-colours border keys on, or the rows for unpaired, overlong, tabbed, binary and cut short lines.
Name the followed path in the diffstat headerBryce Kwon-0/+22
With follow set the diff runs over the whole commit and show_filepair applies the path, so the header read (limited to '') whether or not a path was given.
Check a renamed file's diff leaves the rest outBryce Kwon-8/+15
A new path is diffed across the whole commit so the rename can be found, and a filter then keeps that path alone. The rename commit touched one file, so a diff that dropped the filter passed.
Check each side's line numbers in a later hunkBryce Kwon-6/+31
The test for a hunk that carries a length ran on foo's diff, whose only numbered side is +1 with no length, so it repeated the comma-less test. Every fixture hunk started at line 1, so a parser that always answered 1 passed. A line 0 never gets a link, so the absent 0 link could not show either way.
Read the file and diff tables as layoutBryce Kwon-0/+6
The file view's table only sets the line numbers beside the code, and the unified diff's is a single cell holding every file.
Show a renamed file's diff as the renameBryce Kwon-0/+35
A diff limited to the new name cannot see the old one, so the diffstat's link for a renamed file, the commit page reached from that file's log, and the file's rawdiff and patch all showed every line as added. A path the old tree lacks is now diffed across the whole commit with rename detection aimed at it alone, the way git blame looks for a rename, so it is compared with the commit's deleted files and nothing else. Doing it in cgit_diff_tree keeps the log's counts for that commit in step with the page they link to. The rawdiff and patch pages leave the diff to git's own output, so for them that search finds the old name, and both names go into the limit with rename detection on.
Spell side-by-side in the test commentsBryce Kwon-2/+2
Look for the old and new lines in one loopBryce Kwon-11/+4
Ask for a url through cgit_url everywhereBryce Kwon-3/+3
Add the shared config writers and cgit_rcBryce Kwon-14/+4
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.
Look up a request's commit in one placeBryce Kwon-0/+10
The diff page now names a revision that is no commit the way the request wrote it, as the other pages already did, rather than as the full id it resolved to. The helpers sit beside the error page in ui-shared.c, since shared.c prints nothing.
Trim the comments and dead code across the treeBryce Kwon-6/+5
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/