[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pic anomalies
From: |
Ingo Schwarze |
Subject: |
Re: pic anomalies |
Date: |
Mon, 30 Dec 2019 13:39:38 +0100 |
User-agent: |
Mutt/1.12.2 (2019-09-21) |
Hi Larry,
Larry McVoy wrote on Sun, Dec 29, 2019 at 03:23:33PM -0800:
> On a different topic, is there any sort of test suite for pic
> and the other parts of roff?
I'm not aware of any tests for pic(1), anywhere.
An extremely small number of tests (14 tests grand total) is scattered
all around the groff source tree, for example:
- contrib/gdiffmk/tests/gdiffmk_tests.sh
- contrib/hdtbl/examples/test-hdtbl.sh.in
- contrib/mom/examples/test-mom.sh.in
- src/roff/groff/tests/
- tmac/tests/
You can run that suite with "make check" from the top directory,
but it is not much use because it is very fragile. For example,
right now, after "git pull" and building from source, nine out
of the fourteen tests fail for me on OpenBSD-current, so it's at
least about 65% broken.
The mandoc test suite provides more extensive and more robust
coverage of groff even though that's not its main purpose; its
purpose is to test mandoc. But since it uses groff to generate
lots of files of expected reference output, you can also use it to
find regressions in groff. I routinely do that when working on
groff patches. However, you must run OpenBSD to do that: the
maintainer targets needed to run groff only work on OpenBSD.
I did the work of making the mandoc tests portable, but i didn't
write a portable version of the maintainer targets.
The sequence to test groff on OpenBSD is:
cd /usr/src/regress/usr.bin/mandoc
make obj-clean
make groff-clean
make groff # runs nroff on 457 test files
# and tbl on 24 test files
cvs diff -Nup # to see whether groff output changed
# the rest is not needed when only testing groff
make obj
make regress # to compare mandoc output to groff output;
# runs about 1300 mandoc tests grand total
For the code of this test suite, see
https://cvsweb.openbsd.org/src/regress/usr.bin/mandoc/
This suite includes tests for some low-level roff stuff (request
and macro argument handling, conditionals, escape sequences, scaling
units, user defined strings, .br, .cc, .ce, .char, .de, .ds, .ft,
.ig, .it, .ll, .na, .nr and number registers, .po, .ps, .return,
.rm, .rn, .shift, .sp, .ta, .ti, .tr, .while, complete testing of
character escape sequences in -T ascii and -T utf8 output modes,
very extensive testing of the groff_mdoc(7) macros and also substantial
testing of the groff_man(7) macros, and about two dozen tests for
tbl(1).
Admittedly, the focus is on what is needed for manual pages
and on ASCII output. There are no tests whatsoever for PostScript
or PDF output.
Yours,
Ingo
- Re: pic anomalies, (continued)
- Re: pic anomalies, Federico Lucifredi, 2019/12/27
- Re: pic anomalies, Eric S. Raymond, 2019/12/27
- Re: pic anomalies, Ingo Schwarze, 2019/12/27
- Re: pic anomalies, Eric S. Raymond, 2019/12/27
- Re: pic anomalies, Ingo Schwarze, 2019/12/29
- Re: pic anomalies, Colin Watson, 2019/12/29
- Re: pic anomalies, Larry McVoy, 2019/12/29
- Re: pic anomalies,
Ingo Schwarze <=
- Re: pic anomalies, Colin Watson, 2019/12/30
- GNUism in groff tests, was: pic anomalies, Ingo Schwarze, 2019/12/30
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/30
- Re: GNUism in groff tests, Ralph Corderoy, 2019/12/30
- Re: GNUism in groff tests, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests, Ralph Corderoy, 2019/12/31
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/31
- Re: GNUism in groff tests, Colin Watson, 2019/12/30
- Re: GNUism in groff tests, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/31