summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc/mdoc
AgeCommit message (Collapse)Author
2014-11-17Multiple fixes with respect to in-line macros:Ingo Schwarze
* .No selects the default font; relevant e.g. in .Bf blocks * no need to force empty .Li elements * closing delimiters as leading macro arguments do not suppress space * opening delimiters at the end of a macro line do not suppress space * correctly handle delimiter spacing in -Tman As a side effect, these fixes let mandoc warn about empty .No macros as requested by bentley@.
2014-11-17check spacing and behaviour in the SEE ALSO section as wellIngo Schwarze
2014-11-16When a line (in the sense of term_flushln()) contains white space only,Ingo Schwarze
the `vbl' variable includes the left margin, but `vis' does not. Prevent a `vis' underflow that caused a bogus blank line. Bug reported by Carsten Kunze, found in less(1): .Bl -tag ... .It " "
2014-11-10add required vertical spacing before lists that beginIngo Schwarze
at the beginning of the first item of an enclosing list right at the beginning of a new section or subsection; minibug reported by Steffen Nurpmeso <sdaoden at yandex dot com>
2014-11-10more tests found in my treeIngo Schwarze
2014-11-10SKIP_GROFF tests need to adapt to the changed rendering of \(bu, tooIngo Schwarze
2014-11-10adapt to the changed rendering of \(buIngo Schwarze
2014-10-30Major bugsquashing with respect to -offset and -width:Ingo Schwarze
1. Support specifying the .Bd and .Bl -offset as a macro default width; while here, simplify the code handling the same for .Bl -width. 2. Correct handling of .Bl -offset arguments: unlike .Bd -offset, the arguments "left", "indent", and "indent-two" have no special meaning. 3. Fix the scaling of string length -offset and -width arguments in -Thtml. Triggered by an incomplete documentation patch from bentley@.
2014-10-11warn about parentheses in function names after .Fn and .Fo;Ingo Schwarze
particularly useful when converting from other languages to mdoc(7); feature suggested by bentley@
2014-08-26inevitable churn caused by the section title changeIngo Schwarze
2014-08-21Right after .Fl, a middle delimiter triggers an empty scope,Ingo Schwarze
just like a closing delimiter. This didn't work in groff-1.15, but it now works in groff-1.22. After being closed by delimiters, .Nm scopes do not reopen. Do not suppress white space after .Fl if the next node is a text node on the same input line; that can happen for middle delimiters. Fixing an issue reported by jmc@.
2014-08-19Do not dereference a NULL pointer if a .Bl macro hasIngo Schwarze
no -type, -width, -offset or -compact arguments whatsoever; this got broken in mdoc_validate.c rev. 1.156. While here, sort headers.
2014-08-17Segfault fixes from kristaps@.Ingo Schwarze
Note that .It and .Nm blocks without bodies cannot be generated by valid mdoc(7) syntax but are a adequate representations of invalid mdoc(7) constructs like Bl -hang It Bo Sh and Sh SYNOPSIS Nm Bo Sh.
2014-08-16If a stray .It follows .El, we are no longer in the list,Ingo Schwarze
even though the list is still the last processed macro. This fixes a regression introduced in mdoc_macro.c rev. 1.95: Ulrich Spoerlein <uqs at FreeBSD> reports that various of their kernel manuals trigger assertions.
2014-08-14new regression tests collected during recent workIngo Schwarze
2014-08-11start catching up with recent code changes, but no new files yetIngo Schwarze
2014-07-07Clean up ERROR messages related to document structure and macros:Ingo Schwarze
Hierarchical naming and mention macro names in messages.
2014-07-07no need to delete any content from .Rs blocks,Ingo Schwarze
and downgrade the related message from ERROR to WARNING
2014-07-07no need to skip content before first section headerIngo Schwarze
2014-07-06Clean up messages related to plain text and to escape sequences.Ingo Schwarze
* Mention invalid escape sequences and string names, and fallbacks. * Hierarchical naming.
2014-07-05Cleanup with respect to bad macro arguments.Ingo Schwarze
* Fix .Sm with invalid arg: move arg out and toggle mode. * Promote "unknown standard" from WARNING to ERROR, it loses information. * Delete MANDOCERR_BADWIDTH, it would only indicate a mandoc(1) bug. * Do not report MANDOCERR_BL_LATETYPE when there is no type at all. * Mention macro names, arguments and fallbacks.
2014-07-05Cleanup regarding -offset and -width:Ingo Schwarze
* Bugfix: Last one wins, not first one. * Fix .Bl -width without argument: it means 0n, so do not ignore it. * Report macro names, argument names and fallbacks in related messages. * Simplify: Garbage collect auxiliary variables in pre_bd() and pre_bl().
2014-07-04Clean up messages regarding excess arguments:Ingo Schwarze
* 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.
2014-07-04Clean up messages related to missing arguments.Ingo Schwarze
* Do not warn about empty -column cells, they seem valid to me. * Downgrade empty item and missing -std from ERROR to WARNING. * Hierarchical naming. * Descriptive, not imperative style. * Mention macro names, argument names, and fallbacks. * Garbage collect some unreachable code in post_it().
2014-07-03Fix formatting of empty .Bl -inset item heads.Ingo Schwarze
Downgrade empty item heads from ERROR to WARNING. Show the list type in the error message. Choose better variable names for nodes in post_it().
2014-07-02Improve and test the messages about empty macros,Ingo Schwarze
in particular reporting the macro names involved.
2014-07-02When .Sm is called without an argument, groff toggles the spacing mode,Ingo Schwarze
so let us do the same for compatibility. Using this feature is of course not recommended except in manual page obfuscation contests.
2011-12-04test some simple macros; written while working on -TmanIngo Schwarze
2014-07-02Disentangle the MANDOCERR_CHILD message, which reported threeIngo Schwarze
completely different things, into three distinct messages. Also mention the macro names we are talking about.
2014-07-02Clean up warnings related to macros and nesting.Ingo Schwarze
* 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.
2014-07-02Fix the column numbers associated with in_line_argn() macros;Ingo Schwarze
this bug is more than four years old, introduced by kristaps@ in mdocml.bsd.lv rev. 1.46, March 30, 2010.
2014-07-02move test to the right directoryIngo Schwarze
2014-07-02Improve "skipping paragraph macro" messages,Ingo Schwarze
showing which macro was skipped and before or after what.
2014-07-02Implement the obsolete macros .En .Es .Fr .Ot for backward compatibility,Ingo Schwarze
since this is hardly more complicated than explicitly ignoring them as we did in the past. Of course, do not use them!
2014-07-01Clean up the warnings related to document structure.Ingo Schwarze
* 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.
2014-06-20As suggested by jmc@, only include line and column numbers into messagesIngo Schwarze
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.
2014-06-20As suggested by jmc@, only include line and column numbers into messagesIngo Schwarze
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.
2014-06-20regression tests for prologue warningsIngo Schwarze
2014-06-20Infrastructure for regression tests of mandoc messages.Ingo Schwarze
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.
2014-04-15Using macros in .Sh header lines, or having .Sm off or .Bk -words openIngo Schwarze
while processing .Sh, is not at all recommended, but it's not strictly a syntax violation either, and in any case, mandoc must not die in an assertion. I broke this in rev. 1.124. Crash found while trying to read the (rather broken) original 4.3BSD-Reno od(1) manual page.
2014-04-14When i committed man_term.c rev. 1.99, i forgot to adjust this test;Ingo Schwarze
now i found the M in my tree...
2014-04-08more tests for excessively long text in TERMP_NOBREAK modeIngo Schwarze
2014-02-16when indenting, extend the right margin accordingly, when needed;Ingo Schwarze
fixes a crash reported by blambert@ and a few other, similar ones
2014-01-24Improve formatting of broken blocks in -Tman,Ingo Schwarze
somewhat similar to what mdoc_term.c already does for -Tascii.
2013-12-25repair the datesIngo Schwarze
2013-12-25Implement .Fo/.Fa/.Fc indentation and break handling for -Tman.Ingo Schwarze
2013-12-25Do not break output lines in .Fn function arguments in SYNOPSIS mode.Ingo Schwarze
Following an idea from Franco Fichtner, but implemented more cleanly. This reduces groff-mandoc-differences in base by a fantastic 7.5%.
2013-12-24Implement SYNOPSIS .Fn indentation for -Tman.Ingo Schwarze
2013-12-24It turns out SYNOPSIS mode does not imply .Bk in general,Ingo Schwarze
but only within .Nm blocks. Simplify the code accordingly. This reduces groff-mandoc differences in base by about 2%. Triggered by research done by Franco Fichtner.
2013-12-24When deciding whether two consecutive macros are on the same input line,Ingo Schwarze
we have to compare the line where the first one *ends* (not where it begins) to the line where the second one starts. This fixes the bug that .Bk allowed output line breaks right after block macros spanning more than one input line, even when the next macro follows on the same line.