AgeCommit message (Collapse)AuthorLines
Time the other filters at two lengths as wellBryce Kwon-18/+5
The avatar checks held a 40000 byte address to half a second, twenty times tighter than the readme budget that already failed on a slow host, and in stub mode nearly all of that time went on the fake digest. Link-commits and link-trailers had no check on a long input at all. The readme checks' method moves into the harness so all four share it. A single timing of each length let a busy host that took the CPU away during the longer one make a linear pass look quadratic. The lengths now take turns and the fastest timing of each counts, since a busy host can slow one timing but rarely all five. A ratio under six ends the turns at once, so only one near the bound of ten waits for all five.
Drop the section labels from the readme checksBryce Kwon-4/+0
Cover the rest of the man macrosBryce Kwon-0/+25
Cover the rest of the markdown grammarBryce Kwon-0/+53
The changelog for 2.12.0 says a list split by a code block keeps counting, and only the split by a blank line was checked.
Pair each readme absence check with what rendersBryce Kwon-2/+6
Four checks only looked for something missing, which a dropped or plain text rendering also satisfies, and the spacing macro check missed a 0 drawn at the start of a line.
Never give two headings the same anchorBryce Kwon-0/+10
A repeat's count was keyed on the bare text, so a heading whose text already ended in that count took the same anchor, as "Twice 1" did after two of "Twice", and "About 1" after "About". A link to either then landed on the first. The count now goes on up past any anchor already handed out, the way GitHub's slugger does.
Check what the nesting rules actually renderBryce Kwon-3/+6
The emphasis bomb checked only that the output was not empty, which it never is, and its input never nests. No input reaches the ceiling on inline nesting either, since an emphasis cannot hold its own kind, so the check now proves the nesting that does happen. Past the quote ceiling only the innermost text was looked for, and any x passed.
Check the two fallbacks around rendering a readmeBryce Kwon-0/+13
Prove the about page fallback on any machineBryce Kwon-1/+2
The fallback through cgit ran only where cgit's own Lua lacked lpeg, and every machine the suite runs on has it, so the test never ran. With every Lua search path pointed at an empty directory it runs anywhere. It now also checks that the readme's markup is escaped, as its title said, and compares the whole log line.
Decide every unit check skip in the shellBryce Kwon-17/+6
Where a standalone Lua had no lpeg, the harness skipped the markdown and man checks itself, behind a note the test library hides, and the test passed on the six checks left. The real luaossl checks were left out the same way. Each now shows as a skip under a prerequisite named for the interpreter, and a misspelt mode fails rather than running the default.
Time each hostile readme at two lengthsBryce Kwon-17/+48
One ten second budget covered several inputs, so a failure did not say which had regressed, and it allowed ten times the second a readme is held to while leaving a slow host little room. A linear render costs four times as much at four times the length and a quadratic one sixteen, whatever the host. The cap on unclosed brackets had no check at all, and the line of \h' escapes timed nothing that is bounded.
Check that a link's fragment is escapedBryce Kwon-0/+3
Prove a control byte cannot hide a link's schemeBryce Kwon-2/+9
The old check split the scheme with a newline, which ends the line before a link can form, so it passed with the strip removed.
Name a missing Lua module in the error logBryce Kwon-0/+7
Keep counting across a split ordered listBryce Kwon-0/+7
Drop a stray blank line from about-render's testsBryce Kwon-1/+0
Drop the readme hooks that nothing readsBryce Kwon-5/+4
Nothing in assets/ or in README's list of hooks reads a fenced block's data-lang or the manpage class on a man page's wrapper.
Render the man pages that generators writeBryce Kwon-2/+69
DocBook, pod2man and hand written pages leaked roff onto the page. Font escapes inside no fill blocks, comments, layout escapes such as \% and \c, the colours and half line moves around DocBook's links, and the requests and macro definitions their preambles open with all showed through. Those now draw nothing, the common named characters and strings render, .EX and pod2man's .Vb read as code, a .TP tag takes a line of its own and the alternating font macros switch fonts between their arguments. Anything rarer still falls back to its text.
Render more of the markdown seen in readmesBryce Kwon-0/+26
A line of equals signs or dashes under a paragraph now makes a heading of it, as on GitHub, instead of running into its text, and any other rule ends the paragraph. Four spaces or a tab start a code block, and an escaped pipe stays in its table cell. A link opening with two slashes or backslashes in any mix leads to another site, so it renders as text like the plain scheme relative one already did.
Keep a readme whole past a NUL byteBryce Kwon-6/+5
cgit takes filter output through a C string sink that stops at the first NUL, so a readme holding one lost everything after it. Each NUL now shows as U+FFFD, as a browser would show it.
Give the trim timing check room for a slow hostBryce Kwon-2/+3
The about-render unit test bounds three renders at one second to catch the cubic trim coming back. They take 0.1 s on a fast host and three seconds on a slow one, where the check failed, while the old code took minutes, so ten seconds still tells the two apart.
Give readme headings anchors like GitHub'sBryce Kwon-8/+21
A readme's links to its own sections, as in a table of contents, had nothing on the page to land on.
Keep underscores inside words out of emphasisBryce Kwon-0/+6
Let character references through to the browserBryce Kwon-0/+9
Decoding them here instead would mean carrying every named reference HTML defines, while the browser already knows them all.
Honour backslash escapes in readmesBryce Kwon-0/+9
Link the urls and addresses in angle bracketsBryce Kwon-0/+8
Keep a wrapped list item in its listBryce Kwon-0/+9
The item's second line became a paragraph of its own and the items after it a new list, so an ordered list started counting again.
Let a table cut a paragraph shortBryce Kwon-0/+3
A table written right under a line of text came out as more of the paragraph, pipes and all.
Run a paragraph's lines together like GitHubBryce Kwon-3/+10
GitHub shows a single newline in a markdown file as a space, and roff fills the lines of a man page the same way, so text wrapped in the source came out ragged on the about page.
Leave images and badges out of rendered readmesBryce Kwon-6/+7
A relative image loaded from below the about page, which answers 404 now, and a remote one had every visitor's browser call a third party. A badge also came out as a link to its own image, wrapped in stray brackets.
Lead a readme's relative links into the treeBryce Kwon-1/+35
A browser resolved them against the about page, where nothing lives now that the page answers 404 below itself. They resolve the way GitHub resolves a readme's links instead, from the readme's directory and on the branch it was read from.
Trim readme lines in linear timeBryce Kwon-0/+10
The heading pattern backtracked over a run of spaces in cubic time and the cell trim in quadratic time, so one crafted line in a readme could hold a request for half an hour, well inside the size cap. The heading rule now also keeps a sharp that ends a word, as in "# C#".
Clean up the whole treeBryce Kwon-56/+28
Add a test suite for the shipped extensionsBryce Kwon-0/+248