summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc
AgeCommit message (Collapse)Author
2015-12-02Fix the mandoc test suite after afresh1@ changed wcwidth(3) in libcIngo Schwarze
for the private use area starting at U+E000. Sometimes, even i'm surprised how much stuff these tests keep track of. Originally, they were only intended to catch regressions in mandoc... Issue noticed by daniel@, thanks!
2015-12-01Cope with the changed order of warning and error messages caused by theIngo Schwarze
seperation of parsing and validation modules. I originally intended to mop this up when the parser reorg is complete, but since the work stalled a bit, i should not leave this lying around broken for weeks. Reminded by daniel@.
2015-11-06The recent update to /usr/share/locale/UTF-8/LC_CTYPE by afresh1@Ingo Schwarze
fixed wcwidth(3) for various unusual characters.
2015-10-30If a .Bd block has no arguments at all, drop the block and only keepIngo Schwarze
its contents. Removing a gratuitious difference to groff output found after a related bug report from krw@.
2015-10-17Very tricky diff to fix macro interpretation and spacing around tabsIngo Schwarze
in .Bl -column; it took me more than a day to get this right. Triggered by a loosely related bug report from tim@. The lesson for you is: Use .Ta macros in .Bl -column, avoid tabs, or you are in for surprises: The last word before a tab is not interpreted as a macro (unless there is a blank in between), the first word after a tab isn't either (unless there is a blank in between), and a blank after a tab causes a leading blank in the respective output cell. Yes, "blank", "tab", "blank tab" and "tab blank" all have different semantics; if you write code relying on that, good luck maintaining it afterwards...
2015-10-16test mixing of tabs with TaIngo Schwarze
2015-10-13Reject the escape sequences \[uD800] to \[uDFFF] in the parser.Ingo Schwarze
These surrogates are not valid Unicode codepoints, so treat them just like any other undefined character escapes: Warn about them and do not produce output. Issue noticed while talking to stsp@, semarie@, and bentley@.
2015-10-12Use "-" rather than "\(hy" for the heads of .Bl -dash and -hyphen lists.Ingo Schwarze
In UTF-8 output, that renders as ASCII HYPHEN-MINUS (U+002D) rather than HYPHEN (U+2010), which looks better and matches groff. In ASCII output, it makes no difference. Suggested by naddy@.
2015-09-21Trailing whitespace is significant when determining the width of a tagIngo Schwarze
in mdoc(7) .Bl -tag and man(7) .TP, but not in man(7) .IP. Quirk reported by Jan Stary <hans at stare dot cz> on ports@.
2015-09-14Remove the warning about children of .Vt blocks because actually,Ingo Schwarze
.Vt type global_variable No = Dv defined_constant ; is the best way to specify in the SYNOPSIS how a global variable is initialized in the rare case where that matters. Issue noticed by jmc@.
2015-09-08Apparently, some recent update of Unicode data in the base systemIngo Schwarze
changed the output of wcwidth(3) for some weird Unicode characters, causing harmless whitespace changes in mandoc(1) output; fix up the regression suite accordingly. The processing of the characters themselves still works correctly, as it did before, and that's what these tests are intended to make sure. They were never intended to check for whitespace issues. Problem reported by jsg@.
2015-09-04Fill mode changes don't break next-line scope in all cases,Ingo Schwarze
in particular not for tagged paragraphs. Issue found by Christian Neukirchen <chneukirchen at gmail dot com> in the exiv2(1) manual page.
2015-08-29add regression test for \n(.$ and \\$*Ingo Schwarze
2015-07-18now that groff handles \(bu properly,Ingo Schwarze
remove the special casing in the test suite
2015-06-27Ignore blank characters at the beginning of a conditional block,Ingo Schwarze
that is, after "\{". Issue found by Markus <Waldeck at gmx dot de> in bash(1).
2015-05-31Implement the roff(7) `r' (register exists) conditional.Ingo Schwarze
Missing feature found by Markus <Waldeck at gmx dot de> in Debian's bash(1) manual page.
2015-04-29Replace the kludge for the \z escape sequence by an actualIngo Schwarze
implementation. As a side effect, minus ten lines of code. As another side effect, this also fixes the assertion failure that used to be triggered by "\z\o'ab'c" at the beginning of an output line, found by jsg@ with afl (test case 022/Apr27).
2015-04-19More than one data field may follow T} on the same input line.Ingo Schwarze
Issue found by Christian Neukirchen <chneukirchen at gmail dot com> in the socket(2) manual on Linux. Also fixes major rendering bugs (including partial loss of content) in XkbChangeControls(3), XkbFreeClientMap(3), XkbGetMap(3), XkbKeyNumGroups(3), and XkbSetMap(3).
2015-04-19If an explicit line break request (.br or .sp) occurs within an .HP block,Ingo Schwarze
the next line doesn't hang, but is simply indented. Issue found by Christian Neukirchen <chneukirchen at gmail dot com> in the dmsetup(8) manual on Linux. This patch also improves the indentation of XDGA(3) and XrmGetResource(3).
2015-04-06Do not mistreat empty arguments to font alternating macrosIngo Schwarze
as vertical spacing requests. Bug found with xmahjongg(6).
2015-04-06On a new RS nesting level, the saved width starts from the defaultIngo Schwarze
width, not from the saved width of the previous level. Improves xterm(1) and XSetEventQueueOwner(3); found in transcode_filter(1).
2015-04-06Use the default width for .RS without arguments.Ingo Schwarze
Reduces groff-mandoc differences in base and Xenocara by about 4%. Found while looking at wpa_supplicant(8).
2015-04-05If a partial explicit block extending to the next input line followsIngo Schwarze
the end macro of a broken block, put all of it into the breaking block. Needed for example by mutella(1).
2015-04-05Arguments to end macros of broken partial explicit blocksIngo Schwarze
must go inside the breaking block. For example, in .It Ic cmd Oo .Ar optional_arg Oc Ar mandatory_arg the mandatory_arg is still inside the .It block. Used for example by mutella(1).
2015-04-04Give man(7) section and subsection headers heanging indentation.Ingo Schwarze
Reduces groff-mandoc differences in base by about 2.5% due to various Perl manuals having long section titles. Quirk found in argtable2(3).
2015-04-04Fix a quirk with respect to empty .HP.Ingo Schwarze
Found while writing a regression test for man_macro.c rev. 1.66. Incidentally, this brings rendering of XFreeEventData(3) closer to groff.
2015-03-20more tests regarding empty header linesIngo Schwarze
2015-03-20The .PD macro can occur in next-line scope. Fixes zshmisc(1).Ingo Schwarze
Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>.
2015-03-09prevent the skipvsp flag from creeping past actual textIngo Schwarze
2015-02-23improve NAME section diagnostics;Ingo Schwarze
confusing messages reported by Jan Stary <hans at stare dot cz>
2015-02-21Escape quotes when expanding macro arguments.Ingo Schwarze
This fixes a bug naddy@ found in plan9/rc(1).
2015-02-17Render \(lq and \(rq as '"' in -Tascii mode but leave the renderingIngo Schwarze
of .Do/.Dc, .Dq, .Lb, and .St untouched. Reduces groff-mandoc differences in base by about 7%. Reminded of the issue by naddy@.
2015-02-17Let .it accept numerical expressions, not just numerical constants.Ingo Schwarze
For .it, ignore scaling units in roff_getnum(). Inside parentheses, skip whitespace after a sign in roff_getnum(). Parse and ignore unary plus in roff_getnum(). As a bonus, get rid of the only call to mandoc_strntoi() in roff.c.
2015-02-16clean up post_dt() validation function;Ingo Schwarze
improved diagnostics, minus six lines of code
2015-02-16The wrong test was marked SKIP_GROFF.Ingo Schwarze
2015-02-12After almost five years and 92 revisions, mdoc_macro.c rev. 1.139Ingo Schwarze
finally fixed the four issues explained in the mdoc_macro.c rev. 1.47 commit message.
2015-02-12Do not confuse .Bl -column lists that just broken another blockIngo Schwarze
with newly opened .Bl -column lists; fixing an assertion failure jsg@ found with afl: test case #481, Bl It Bl -column It Bd El text text El
2015-02-12Delete the mdoc_node.pending pointer and the function calculatingIngo Schwarze
it, make_pending(), which was the most difficult function of the whole mdoc(7) parser. After almost five years of maintaining this hellhole, i just noticed the pointer isn't needed after all. Blocks are always rewound in the reverse order they were opened; that even holds for broken blocks. Consequently, it is sufficient to just mark broken blogs with the flag MDOC_BROKEN and breaking blocks with the flag MDOC_ENDED. When rewinding, instead of iterating the pending pointers, just iterate from each broken block to its parents, rewinding all that are MDOC_ENDED and stopping after processing the first ancestor that it not MDOC_BROKEN. For ENDBODY markers, use the mdoc_node.body pointer in place of the former mdoc_node.pending. This also fixes an assertion failure found by jsg@ with afl, test case #467 (Bo Bl It Bd Bc It), where (surprise surprise) the pending pointer got corrupted. Improved functionality, minus one function, minus one struct field, minus 50 lines of code.
2015-02-11do not access a NULL pointer if an .Eo block lacks a tail;Ingo Schwarze
found by jsg@ with afl, test case #16
2015-02-11explicit blocks close out .Nd; fixing data structure corruptionIngo Schwarze
eventually leading to NULL pointer access; found by jsg@ with afl, text case #455.
2015-02-10Be more careful to not generate empty .In, .St, and .Xr nodes.Ingo Schwarze
That could happen when their first argument was another called macro, causing a NULL pointer access in .St validation found by jsg@ with afl. Make in_line_argn() easier to understand by using one state variable rather than two.
2015-02-10Do not read past the end of the buffer if an "f" layout font modifierIngo Schwarze
is followed by the end of the input line instead of a font specifier. Found by jsg@ with afl, test case #591. While here, improve functionality as well: * There is no "r" font modifier. * Font specifiers (as opposed to font modifiers) are case sensitive. * One-character font specifiers require trailing whitespace. * Ignore parenthised and two-letter font specifiers.
2015-01-29reorg tbl(7) test suiteIngo Schwarze
2015-02-07Closing a block validates it, which may end up deleting it,Ingo Schwarze
so if we are in a loop over blocks, cleanly restart the loop rather than risking use after free; found by jsg@ with afl.
2015-02-06replace the last legacy generic message type, "argument count wrong",Ingo Schwarze
by more specific messages, improving diagnostics for .cc .tr .Bl -column
2015-02-06better error reporting regarding .OP .RS .UR .TH argumentsIngo Schwarze
2015-02-06better diagnostics about excess arguments to .PD .ft .spIngo Schwarze
2015-02-06better error reporting for .br .fi .nf with argumentsIngo Schwarze
2015-02-06Delete the legacy generic warning type MANDOCERR_ARGCWARN,Ingo Schwarze
replacing the last instances by more specific warnings. Improved functionality, minus 50 lines of code.
2015-02-06better handle .Fo and .Fd without argumentIngo Schwarze
better handle .Fo with more than one argument