summaryrefslogtreecommitdiffstats
path: root/regress/usr.bin/mandoc/man (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* preserve .PP before .RE; effect found in audio/pms(1)schwarze2015-01-242-0/+8
|
* Support .RE with an argument; needed for audio/pms(1).schwarze2015-01-247-17/+111
|
* For .RS, we need to save the information how much we actually indentedschwarze2014-12-242-0/+8
| | | | | | | because negative indents can get truncated, in which case we no longer know how to restore the original indent at the end of the block. This also solves another case of effectively infinite output found by jsg@ with afl, triggered by very large negative indents.
* support negative horizontal widths in man(7);schwarze2014-12-238-38/+172
| | | | minus twenty lines of code in spite of enhanced functionality
* some scaling unit fixes:schwarze2014-12-232-5/+5
| | | | | - .sp with an invalid argument is .sp 1v, not .sp 0v - in man(1), trailing garbage doesn't make scaling units invalid
* even if the second argument to .IP is invalid, don't print itschwarze2014-12-232-2/+15
|
* correctly handle scaling units after .PDschwarze2014-12-232-4/+16
|
* Explicit block closure macros clobber next-line block head scope,schwarze2014-12-167-9/+50
| | | | | just like explicit block macros themselves. Fixing an assertion failure jsg@ found with afl.
* We repeatedly observed assertion crashes in the low-level terminalschwarze2014-11-2110-8/+77
| | | | | | | | | | | | | | | | | | | | | output handler because the high level terminal formatters could be tricked into setting the left margin further to the right than the right margin. Today, jsg@ found more of these with afl. Change the internal interface between both levels, aiming for simplicity and robustness of the code. Treat both margins as *independent* settings: Now, termp.offset is the requested left margin, and termp.rmargin is the available space. Let the lower level cope with that case of insufficient space. Obviously, high level code that does centering or flush right still has to do careful checks, so i did a full audit of margin settings in the terminal formatters. Fixes crashes caused by excessively long title or date strings in the man(7) footer, operating system or date strings in the mdoc(7) footer, volume strings in the man(7) or mdoc(7) header, and a few cases related to some non-prologue macros.
* more tests found in my treeschwarze2014-11-103-3/+14
|
* inevitable churn caused by the section title changeschwarze2014-08-2659-59/+59
|
* When the first child of the node being validated gets deleted duringschwarze2014-08-188-6/+72
| | | | | | | | | | | | | | | | | validation, man_node_unlink() switches to MAN_NEXT_CHILD. After that, we have to switch back to MAN_NEXT_SIBLING after completing validation, or subsequent parsing would add content into an already closed node, clobbering potentially existing children, causing information loss and a memory leak. Bug found by kristaps@ with valgrind in groff(7) on Mac OS X. Note that the switch back must be conditional, for if the node being validated itself gets deleted, we must *not* go to MAN_NEXT_SIBLING, which would not only yield wrong results in general but also crash in malformed manuals having an empty paragraph before the first .SH, for example OpenBSD c++filt(1). While here, add the missing <sys/types.h> as required before mandoc.h.
* new regression tests collected during recent workschwarze2014-08-1418-4/+124
|
* add missing NOPTS argumentsschwarze2014-08-141-2/+2
|
* start catching up with recent code changes, but no new files yetschwarze2014-08-117-9/+8
|
* Clean up ERROR messages related to document structure and macros:schwarze2014-07-0713-7/+95
| | | | Hierarchical naming and mention macro names in messages.
* Clean up messages regarding excess arguments:schwarze2014-07-044-3/+36
| | | | | | | * Downgrade ".Bf -emphasis Em" from FATAL to WARNING. * Mention the macros, the arguments, and the fallbacks. * Hierarchical naming. Also fix the handling of excess .It head arguments in -Tman.
* Clean up warnings related to macros and nesting.schwarze2014-07-027-3/+50
| | | | | | | * Hierarchical naming of enum mandocerr items. * Improve the wording to make it comprehensible. * Mention the offending macro. * Garbage collect one chunk of ancient, long unreachable code.
* Do not tun the .PHONY parts of ${LINT_TARGETS} twice.schwarze2014-07-021-2/+5
|
* Improve "skipping paragraph macro" messages,schwarze2014-07-0210-6/+26
| | | | showing which macro was skipped and before or after what.
* Clean up the warnings related to document structure.schwarze2014-07-016-8/+6
| | | | | | | | | * Hierarchical naming of the related enum mandocerr items. * Mention the offending macro, section title, or string. While here, improve some wordings: * Descriptive instead of imperative style. * Uniform style for "missing" and "skipping". * Where applicable, mention the fallback used.
* fix expected message levelschwarze2014-06-211-1/+1
|
* As suggested by jmc@, only include line and column numbers into messagesschwarze2014-06-207-7/+15
| | | | | | | | | | | | | | when they are meaningful, to avoid confusing stuff like this: $ mandoc /dev/null mandoc: /dev/null:0:1: FATAL: not a manual Instead, just say: mandoc: /dev/null: FATAL: not a manual Another example this applies to is documents having a prologue, but lacking a body. Do not throw a FATAL error for these; instead, issue a warning and show the empty document, in the man(7) case with the same amount of blank lines as groff does. Also downgrade mdoc(7) documents having content before the first .Sh from FATAL to WARNING.
* regression tests for prologue warningsschwarze2014-06-2010-2/+35
|
* Infrastructure for regression tests of mandoc messages.schwarze2014-06-201-3/+2
| | | | | | Even though messages are not going to be as stable as formatted output, that is, even though the *.out_lint files are expected to change now and then, from now on, i want to be able to catch unintended changes in messages.
* Add a new term_flushln() flag TERMP_BRIND (if break, then indent)schwarze2014-04-086-4/+64
| | | | | | | | | | to control indentation of continuation lines in TERMP_NOBREAK mode. In the past, this was always on; continue using it for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP. I looked at this because sthen@ reported the issue in a manual of a Perl module from ports, but it affects base, too: This patch reduces groff-mandoc differences in base by more than 15%.
* more tests for excessively long text in TERMP_NOBREAK modeschwarze2014-04-083-2/+28
|
* In .nf mode, use the MAN_LINE flag to detect input line breaksschwarze2014-03-083-2/+42
| | | | | | instead of the man_node line member. This is required to preserve line breaks contained in user-defined macros called in .nf mode. Found in a code audit triggered by fixing a similar issue in .TP.
* To find out whether .TP head arguments are same-line or next-line arguments,schwarze2014-03-083-2/+61
| | | | | | | | use the MAN_LINE flag instead of the man_node line member. This is required such that user-defined macros wrapping .TP work correctly. Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via the NetBSD bug tracking system and Thomas Klausner <wiz at NetBSD>.
* when indenting, extend the right margin accordingly, when needed;schwarze2014-02-167-6/+62
| | | | fixes a crash reported by blambert@ and a few other, similar ones
* In the parser, when closing an explicit block that is not open,schwarze2013-11-113-2/+46
| | | | | | | | close below-subsection implicit scopes that may still be open. In the formatter, make sure indentation is reset when leaving a scope, not only when entering the next one. Improves the formatting of gpg(1); issue reported by jca on ports.
* test man.c rev. 1.71schwarze2013-11-105-2/+275
|
* Implement the .UR/.UE block (uniform resource identifier) introduced in theschwarze2013-10-174-2/+59
| | | | | | | | man-ext macros by Eric S. Raymond, enabled by default in groff_man(7). Usual disclaimer: You don't write new man(7) code, so you are not going to use these, either. Improves e.g. the bzr(1) and etherape(1) manuals. Thanks to naddy@ for bringing these to my attention.
* Check handling of two consecutive .TP lines.schwarze2013-07-133-2/+80
| | | | Related to ports/textproc/groff/patches/patch-tmac_an-old_tmac rev. 1.3.
* In literal mode (.nf), each input line must be kept togetherschwarze2013-01-053-2/+40
| | | | | | | | | | on the same output line, even if it is longer than the output width. This commit fixes a bug allowing an overly long last line of an indented block (.RS) to be broken even in literal mode. The bug was found using the sudo_plugin(4) manual provided by millert@. I introduced the bug in rev. 1.84 during the g2k12 Budapest hackathon.
* Check that mandoc handles non-numeric width argumentsschwarze2012-11-183-2/+44
| | | | | | to .Bl -tag and .TP the same way as groff, even via -Tman. Some time ago, millert@ reported issues with these; apparently, those issues were fixed since then.
* Correct indentation for lists and displays inside lists.schwarze2012-11-183-2/+70
| | | | | | | Inspired by a diff from millert@, but implemented rather differently and with slightly better functionality. In particular, this one respects -offset and -width arguments found in the input file.
* Test paragraph distance (.PD) implementation;schwarze2012-11-186-2/+186
| | | | related to man_term.c rev. 1.88, man_validate.c rev. 1.56.
* enable more tests, some were forgotten along the wayschwarze2012-07-184-4/+36
|
* Drop empty .IP such that is does not cause additional vertical spacing.schwarze2012-07-183-2/+54
| | | | Issue first reported by naddy@ in rsync(1).
* Drop .sp and .br right after .SH and .SS.schwarze2012-07-182-0/+9
| | | | | Fixes vertical spacing after "OPTIONS" in gcc(1). Issue first reported by naddy@ in rsync(1).
* Translate blank input lines to .sp just like in mdoc(7),schwarze2012-07-144-2/+165
| | | | | and ignore .sp after .PP. This fixes vertical spacing for blank lines after .PP and for .sp after .PP.
* multiple fixes to -Tascii .HP rendering:schwarze2012-07-1012-2/+238
| | | | | | | | | | | | | | | | * do not add an excessive blank line before the block * in literal mode, start a new line after the tag getting this to work requires some general (print_man_node) fixes: * in literal mode, break the output line at the end of each input line, not just after those input lines ending in text * but don't break it when there was no output on the line * and adjust the margins after the .HP tag these general fixes require an adjustment to -Tascii .TP rendering: * set up NOBREAK mode before the body, not after the head finally, based on all this, implement -Tman .Bl -hang in terms of .HP
* test vertical spacing around filling macros;schwarze2012-07-103-2/+54
| | | | forgot to commit on June 2 after implementing .EX
* Add a test for RS breaking some other block.schwarze2012-07-074-2/+51
| | | | | | Unfortunately, the code triggering the assert fixed in man_macro.c rev. 1.37 must be commented out because groff misformats the invalid input so badly that imitating it really makes no sense.
* Minimal implementation of .EX and .EE for GNU compatibility.schwarze2012-06-028-2/+134
| | | | | Do not use this, it is not portable and only defined in esr's man-ext. For example, sox(1) wants these macros.
* Fix the vertical spacing around tbl(7) instances in man(7).schwarze2012-05-273-0/+102
| | | | | | | | | | | | | | | | Groff forces the document author to manually request sufficient spacing after .TE - that is, at least .sp 1v after a table with the "box" option and at least .sp 2v after a table with the "doublebox" option - or else it clobbers the box. I consider that insane, so i'm not imitating groff in that respect. Instead, i add at least as much vertical space as groff, or more where required to avoid clobbering the box. Consequently, output will be identical for input that looks sane with groff, and mandoc will make output look better for input that looks bad with groff. As a side effect, having identical output for portable input makes it possible to set up the first regression tests for tbl(7).
* After unifying volume titles in the page headers for man(7) and mdoc(7),schwarze2011-12-0217-17/+17
| | | | | adjust the expected man(7) output to the new convention. Related to src/usr.bin/mandoc/man_validate.c rev. 1.51.
* After the recent cleanup of .TH date handling,schwarze2011-11-1913-2/+111
| | | | publish a few more regression tests found in my tree.
* Complete overhaul of the mandoc(1) test suite.schwarze2011-11-1735-27/+38
| | | | | | | | | | | | | | | * Test the recently introduced -Tman output mode, too. * Specify date and OS arguments in all tests. * Remove the kludge of sed(1)ing away the page footer lines. * New make(1) variables SKIP_TMAN, SKIP_GROFF. * Drop obsolete, clumsy make(1) variable GROFF_TARGETS. * Delete obsolete mdoc/Bl/E*.sh error reporting tests. * Silence char/N/basic. * New targets: - ascii, ascii-clean - to run -Tascii tests only - tman, tman-clean - to run the new -Tman tests only - obj-clean - maintainer only, needed before groff-clean and groff - groff-clean - maintainer only, affects checked-in files