summaryrefslogtreecommitdiffstats
path: root/regress
Commit message (Collapse)AuthorAgeFilesLines
* prevent infinite recursion while expanding the argumentsIngo Schwarze2017-03-083-1/+8
| | | | of a user-defined macro; issue found by tb@ with afl(1)
* If a user-defined macro is aborted because it exceeds the stackIngo Schwarze2017-03-074-2/+31
| | | | | | | | | | | | | | | | | | | limit, usually due to infinite recursion, discard whatever remains in all those open stack levels. Otherwise, insane constructions like the following could generate macros of enormous size, causing mandoc(1) to die from memory exhaustion: .de m \" original macro definition .m \" recursion to blow up the stack .de m \" definition to be run during the call of .m marked (*) very long plain text (some kilobytes) .m \" expand the above a thousand times while unwinding the stack .. \" end of the original definition .m \" (*) recursively generate a ridiculously large macro .. \" end of recursively generated definition .m \" execute the giant macro, exhausting memory Very creative abuse found by tb@ with afl(1).
* Escape blanks at the end of markdown linesIngo Schwarze2017-03-071-1/+1
| | | | such that they don't look like output line breaks.
* fix completely empty .Eo: no blank line wantedIngo Schwarze2017-03-072-1/+36
|
* fix spacing after empty .FlIngo Schwarze2017-03-072-2/+2
|
* implement .An -split and -nosplitIngo Schwarze2017-03-074-1/+65
|
* Fix .In formatting in the SYNOPSIS:Ingo Schwarze2017-03-075-2/+79
| | | | No ‌ in the middle of **, please.
* Using .Nd only makes sense in the NAME section.Ingo Schwarze2017-03-061-0/+2
| | | | | Warn if that macro occurs elsewhere. Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
* URIs need different escaping; reported by reyk@Ingo Schwarze2017-03-061-2/+2
|
* first batch of -T markdown testsIngo Schwarze2017-03-05231-8/+3706
|
* Infrastructure for -T markdown tests.Ingo Schwarze2017-03-052-5/+37
| | | | | | This is needed because -T marksdown is expected to receive less maintenance than -T ascii, so we need automation to make sure that regular parser maintenance doesn't break this output mode.
* Use typographic quotes rather than '"' for .Rs %T (no change for -TasciiIngo Schwarze2017-02-175-0/+64
| | | | | output, of course). Patch from bentley@ in November 2014. This can be committed now because groff merged Anthony's patch yesterday.
* Many people have been complaining for a long time that ``...'' looksIngo Schwarze2017-02-1710-15/+14
| | | | | | | | | | | ugly in -Tascii output. For that reason, bentley@ submitted patches to render "..." instead to groff in November 2014 (yes, more than two years ago). Carsten Kunze yesterday merged them for the upcoming groff-1.22.4 release. Yay! Consequently, do the same in mandoc: Render \(Lq and \(Rq (which are used for .Do, .Dq, .Lb, and .St) as '"' in -Tascii output. All other output modes including -Tutf8 remain unchanged.
* more tests for .IP/.nf interaction that i forgot to commitIngo Schwarze2017-02-172-2/+69
|
* Surprisingly, groff does not support scaling units in .Bl -columnIngo Schwarze2017-02-161-1/+1
| | | | | | column width specifiers, so stop supporting them, too. As a side effect, this fixes an assertion failure that tb@ found with afl(1), triggered by: .Bl -column -4n
* Fix block scoping error if an explicit block is broken by twoIngo Schwarze2017-02-163-10/+26
| | | | | | | | | implicit blocks (.Aq Bq Po .Pc) that left the outer breaker open and could in exceptional cases, like between .Bl and .It, cause tree corruption leading to NULL dereference. Found by tb@ with afl(1). While here, do not mark intermediate ENDBODY markers as broken.
* Do not access a NULL pointer if a matrix or square root are empty.Ingo Schwarze2017-02-127-7/+34
| | | | Crashes found by tb@ with afl(1).
* new regression tests for mdoc_macro.c revs. 1.211-1.215Ingo Schwarze2017-02-1113-12/+85
|
* Disable three UTF-8 tests that expose bugs in wcwidth(3) in theIngo Schwarze2017-02-111-1/+1
| | | | | | | | | | | | native C libraries of illumos, Oracle Solaris 11, and SunOS 5.10. While it is useful to catch wcwidth(3) regressions on OpenBSD, the purpose of the *portable* mandoc regression suite is not to check the C library of the host system; that would just hide genuine mandoc portability issues in the noise. The remaining UTF-8 tests are still sufficient to establish that mandoc does the right thing. Issues reported by Sevan Janiyan <venture37 at geeklan dot co dot uk> after testing on OmniOS.
* Escape literal braces in a regular expression.Ingo Schwarze2017-02-091-1/+1
| | | | Deprecated perlre(1) syntax reported by Thomas Klausner and Sevan Janiyan.
* On some systems (e.g. Solaris 11) diff(1) does not support -a.Ingo Schwarze2017-02-081-5/+9
| | | | Make it easier to get rid of it.
* remove some instances of MdocdateIngo Schwarze2017-02-083-3/+3
|
* disable some tests that expose wcwidth(3) differences among systemsIngo Schwarze2017-02-081-1/+4
|
* Finally port the OpenBSD regression suite.Ingo Schwarze2017-02-081244-0/+23823
| | | | | Both kristaps@ and wiz@ repeated asked for this, literally for years.
* Move the regression suite to the attic.Ingo Schwarze2014-03-0386-1432/+0
| | | | | | | It has not been used or maintained for several years, and we won't start using it now. Devlopment regression testing is done in OpenBSD, and there is no value in maintaining two regression suites in parallel.
* Properly handle -mdoc %A in all outputs. This has two-author entiresKristaps Dzonsons2010-09-043-0/+48
| | | | | | | separated by only "and" while two or more are with ", and" for the last author. Also remove relevant TODO and add regression tests.
* Cached `Bl -offset' into mdoc_bl. Removed erroneous "-offset defaultsKristaps Dzonsons2010-06-121-0/+15
| | | | | to 6n if no value is specified" and added regression tests for `Bl' testing against the empty -offset argument.
* Removed stipulation that an empty `Bd -offset' will default to 6n. NotKristaps Dzonsons2010-06-123-0/+66
| | | | | | | sure where this came about. Added regression tests to convince myself that this is so. Also consolidated COMPATIBILITY notes regarding `Bd'. Added COMPATIBILITY note to the effect that old groff pukes on `Bd -compact -ragged' (regression test will fail on old groff).
* Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed inKristaps Dzonsons2010-06-121-0/+28
| | | | | | the "data" union in mdoc_node. Allows me to remove some ugly loops in the front-end and duplicate tests in mdoc_action.c. Add a regression test to make sure we're not doing anything bad (more to come).
* Fix adding some minimal intelligence to conditional parser. See roff.7Kristaps Dzonsons2010-06-101-0/+30
| | | | | | | | | | for what's supported. This simplified the roff_cond() function quite nicely. From a bug report by uqs@. Added regression test based on bug-report example by uqs@. Also added ROFF_DEBUG to see what the hell the parser is actually doing. Obviously turned off by default.
* Normalise SYNOPSIS behaviour after I gave up on following groff'sKristaps Dzonsons2010-06-076-124/+14
| | | | | | | | | | | | | | | | | | | | | inconsistent behaviour. In short: Some macros are displayed differently in the SYNOPSIS section, particularly Nm, Cd, Fd, Fn, Fo, In, Vt, and Ft. All of these macros are output on their own line. If two such dissimilar macros are pair-wise invoked (except for Ft before Fo or Fn), they are separated by a vertical space, unless in the case of Fo, Fn, and Ft, which are always separated by vertical space. Behaviour ok Jason McIntyre, ingo@. Fallout will be treated case-by-case. I had to clear out some regressions that were testing against groff's stranger behaviours: these will now break, as we don't care about such invocations. Also removed the newline for `Cd' invocation in a non-SYNOPSIS context.
* Have regress.sh bail out if $MANDOC isn't found.Kristaps Dzonsons2010-06-061-0/+6
|
* Fixed -Tascii and -Thtml rendering of `Ft' and `Fo'.Kristaps Dzonsons2010-06-064-0/+99
|
* Fixed `Fn' newline behaviour and added some regression tests to thisKristaps Dzonsons2010-06-042-0/+37
| | | | | | | extent. Documented `Fn'. Please note the COMPATIBILITY note regarding historic groff.
* Documented `In' in full.Kristaps Dzonsons2010-06-041-0/+24
| | | | | | Fixed `In' to behave properly: it wasn't properly breaking lines, formatting, or really anything else. Noted COMPATIBILITY with OpenBSD's groff, which pukes all over `In'.
* Fixed `Fd' to format in the right way. Found when confused by what theKristaps Dzonsons2010-06-041-0/+22
| | | | | hell `Fd' is supposed to do anyway (answer: it's a historical macro and we shouldn't be doing anything with it anyway).
* Regression made old-groff-friendly.Kristaps Dzonsons2010-06-011-2/+0
|
* Fixed condition of `\}' closing a conditional at the start of the line.Kristaps Dzonsons2010-06-011-0/+95
| | | | | | | | Fixed flushed-out condition of \} causing subsequent arguments to be truncated, when in fact the whole line should be passed through (if the conditional succeeds) to the front-end and the \} ignored there. Added regression test of this behaviour.
* Macro lines now infer an `It' if they immediately follow a `Bl -column'Kristaps Dzonsons2010-05-313-0/+43
| | | | | | | or a closed-out `It' block within a `Bl -column' (which only happens when a macro or free-form text is encountered prior to an `It'). Added some regression tests for this behaviour.
* Strengthened constraint for passing into `It'.Kristaps Dzonsons2010-05-311-0/+17
| | | | Added regression test for constrained condition.
* Add ability to interpret initial free-form lines as part of a `BlKristaps Dzonsons2010-05-313-0/+39
| | | | | | | | -column' up until the first `It'. This is UGLY and should have all sorts of warnings, and will. On the one hand, it fits with groff's notion of tabs and tab-spaces. On the other hand, it's not really "free-form" text any more. Note that this does not yet accomodate for macros coming on these lines.
* Add some regression tests.Kristaps Dzonsons2010-05-312-0/+36
|
* Tweak regression so it doesn't puke on the groff behaviour (allowingKristaps Dzonsons2010-05-301-1/+1
| | | | | open scopes to migrate across tabs) that we probably won't support and is well-known.
* Migrate `Bl -column' phrases to be MDOC_BODY instead of MDOC_HEAD. ThisKristaps Dzonsons2010-05-304-0/+54
| | | | | | | | | | will make it easy for re-entrant parsing of `Ta' macros to fit in with standard closure rules. Added some more regressions for `Bl -column'. Note that one should fail, as documented in the TODO file. Recorded change of AST BNF in mdoc.3.
* First in several iterative patches in getting complex -column listsKristaps Dzonsons2010-05-302-0/+30
| | | | | | | | supported (which works but is tricky enough that it should be broken down into digestable parts). This simply moves around the propogation of ARGS_PEND into one recognised by phrase(). Added a few regressions for simple -column lists.
* Added a final regression for `Ar' (won't work on old groff).Kristaps Dzonsons2010-05-291-0/+10
|
* Adding `Ar' regression for empty-prior-closing-punctuation checkin.Kristaps Dzonsons2010-05-291-0/+17
| | | | | NOTE: this will not work on old groff, which forgets to print `file ...' when encountering an empty Ar node.
* Commit of patch floated on discuss@ a few days ago: if an in_line scopeKristaps Dzonsons2010-05-294-5/+72
| | | | | | | | | | has not been opened and closing punctuation is encountered AND the macro is marked as accepting no-content (or `Li'), then open an empty scope. Added regression tests for `Fl' and `Li' testing this behaviour. Also, squeeze hyph0.in tests into the last characters of each line so that groff doesn't hyphenate and break the test.
* Documented `Ud'.Kristaps Dzonsons2010-05-262-0/+22
| | | | | | | | | | | Proper EOS handling for `Rv', `Ex', `Ud', and `Bt'. Both `Bt' and `Ud' now warn about and discard line arguments (reported by Ulrich Spoerlein). Collapsed posts_xr into posts_wtext (harmless: they're the same thing). Added regressions for `Ud' and `Bt'.
* Fixed `Lb' to be in_line (reported by Ulrich Spoerlein).Kristaps Dzonsons2010-05-264-0/+74
| | | | | | | | | Added `Lb' documentation to mdoc.7. Removed harmless but superfluous pre_lb check (was just NULL entries). Added regressions for `Lb' (NOTE that these will only run on new groff, as old groff doesn't support `Lb' at all).