summaryrefslogtreecommitdiffstats
path: root/regress/roff/esc/bs_man.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-01-17 06:33:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-01-17 06:33:35 +0000
commit864dedf8122d4fbf75fab795035b2b3d7cb1113a (patch)
tree03f06a5ec17dcee2959f6fc34125e42807976825 /regress/roff/esc/bs_man.in
parent72e25eeca523e5195e5fb704b9c9c73c17acb405 (diff)
downloadmandoc-864dedf8122d4fbf75fab795035b2b3d7cb1113a.tar.gz
Test handling of escaped backslashes because the code related to
copy mode is complicated and prone to regressions.
Diffstat (limited to 'regress/roff/esc/bs_man.in')
-rw-r--r--regress/roff/esc/bs_man.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/regress/roff/esc/bs_man.in b/regress/roff/esc/bs_man.in
new file mode 100644
index 00000000..c0469893
--- /dev/null
+++ b/regress/roff/esc/bs_man.in
@@ -0,0 +1,27 @@
+.\" $OpenBSD: bs_man.in,v 1.1 2019/01/17 06:29:14 schwarze Exp $
+.TH ESC-BS_MAN 1 "January 17, 2019"
+.SH NAME
+esc-bs_man \- escaped backslashes in man(7) code
+.SH DESCRIPTION
+.ds usestr (initial)
+.de testmac
+prefix\*[usestr]suffix
+prefix\\*[usestr]suffix
+..
+.ds teststr prefix\*[usestr]middle\\*[usestr]suffix
+.ds usestr (later)
+on a text line: prefix\\suffix
+.PP
+in a macro definition:
+.testmac
+.PP
+in a string definition: \*[teststr]
+.PP
+in a high-level macro argument:
+.IB prefix ##\\*[usestr]## suffix
+.PP
+.de argmac
+{\\$1}
+..
+in a user-defined macro argument:
+.argmac prefix\\*[usestr]suffix