[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc / regress / roff / string

File: [cvsweb.bsd.lv] / mandoc / regress / roff / string / Makefile (download)

Revision 1.5, Fri Jun 3 12:16:02 2022 UTC (2 years ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +6 -1 lines

During identifier parsing, handle undefined escape sequences
in the same way as groff:
* \\ is always reduced to \
* \. is always reduced to .
* other undefined escape sequences are usually reduced to the escape name,
for example \G to G, except during the expansion of expanding escape
sequences having the standard argument form (in particular \* and \n),
in which case the backslash is preserved literally.

Yes, this is confusing indeed.
For example, the following have the same meaning:
* .ds \.   and   .ds .     which is not the same as   .ds \\.
* \*[\.]   and   \*[.]     which is not the same as   \*[\\.]
* .ds \G   and   .ds G     which is not the same as   .ds \\G
* \*[\G]   and   \*[\\G]   which is not the same as   \*[G]   <- sic!

To feel less dirty, have a leaning toothpick, if you are so inclined.

This patch also slightly improves the string shown by the "escaped
character not allowed in a name" error message.

# $OpenBSD: Makefile,v 1.10 2022/06/03 11:50:25 schwarze Exp $
#
# This directory is intended for tests of string *expansion*,
# in particular testing the behaviour of the \* escape sequence.
# Tests of string *definitions* are better placed in the roff/ds
# directory.

REGRESS_TARGETS	 = dotT escape infinite name std undef zerolength
LINT_TARGETS	 = name std undef
UTF8_TARGETS	 = dotT
HTML_TARGETS	 = dotT
SKIP_MARKDOWN	 = escape infinite name std undef zerolength

# The infinite test fails badly with groff-1.20.1:
# It fails to print the following text.

SKIP_GROFF	?= infinite

# Groff can expand standard macros as strings, but mandoc cannot.

SKIP_GROFF	+= std

.include <bsd.regress.mk>