summaryrefslogtreecommitdiffstats
path: root/regress/roff/string
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-16 13:54:06 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-16 13:54:06 +0000
commit27f1545e0f756e82e793a38e1bc5a55d673a6261 (patch)
treeaec0540f62f2ddaaf8ca6abc5d05a59cd47da072 /regress/roff/string
parent53895dc947dd04e38242df7ec586e07b9b14ba99 (diff)
downloadmandoc-27f1545e0f756e82e793a38e1bc5a55d673a6261.tar.gz
Implement the \*(.T predefined string (interpolate device name)
by allowing the preprocessor to pass it through to the formatters. Used for example by the groff_char(7) manual page.
Diffstat (limited to 'regress/roff/string')
-rw-r--r--regress/roff/string/Makefile5
-rw-r--r--regress/roff/string/dotT.in20
-rw-r--r--regress/roff/string/dotT.out_ascii19
-rw-r--r--regress/roff/string/dotT.out_html7
-rw-r--r--regress/roff/string/dotT.out_markdown21
-rw-r--r--regress/roff/string/dotT.out_utf819
6 files changed, 90 insertions, 1 deletions
diff --git a/regress/roff/string/Makefile b/regress/roff/string/Makefile
index eda8c8ad..b8885c65 100644
--- a/regress/roff/string/Makefile
+++ b/regress/roff/string/Makefile
@@ -1,7 +1,10 @@
# $OpenBSD: Makefile,v 1.6 2014/07/06 19:08:57 schwarze Exp $
-REGRESS_TARGETS = escape infinite name std undef zerolength
+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.
diff --git a/regress/roff/string/dotT.in b/regress/roff/string/dotT.in
new file mode 100644
index 00000000..6ff81598
--- /dev/null
+++ b/regress/roff/string/dotT.in
@@ -0,0 +1,20 @@
+.\" $OpenBSD: dotT.in,v 1.1 2018/08/16 13:49:40 schwarze Exp $
+.Dd $Mdocdate$
+.Dt STRING-DOTT 1
+.Os
+.Sh NAME
+.Nm string-dotT
+.Nd interpolating the device name
+.Sh DESCRIPTION
+initial text
+.Pp
+BEGINTEST
+.Pp
+We are using the \*(.T device.
+.Pp
+.ds .T name
+The device \*(.T can be overridden.
+.Pp
+ENDTEST
+.Pp
+final text
diff --git a/regress/roff/string/dotT.out_ascii b/regress/roff/string/dotT.out_ascii
new file mode 100644
index 00000000..e1737090
--- /dev/null
+++ b/regress/roff/string/dotT.out_ascii
@@ -0,0 +1,19 @@
+STRING-DOTT(1) General Commands Manual STRING-DOTT(1)
+
+NNAAMMEE
+ ssttrriinngg--ddoottTT - interpolating the device name
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ BEGINTEST
+
+ We are using the ascii device.
+
+ The device name can be overridden.
+
+ ENDTEST
+
+ final text
+
+OpenBSD August 16, 2018 OpenBSD
diff --git a/regress/roff/string/dotT.out_html b/regress/roff/string/dotT.out_html
new file mode 100644
index 00000000..67cb1eed
--- /dev/null
+++ b/regress/roff/string/dotT.out_html
@@ -0,0 +1,7 @@
+BEGINTEST
+<div class="Pp"></div>
+We are using the html device.
+<div class="Pp"></div>
+The device name can be overridden.
+<div class="Pp"></div>
+ENDTEST
diff --git a/regress/roff/string/dotT.out_markdown b/regress/roff/string/dotT.out_markdown
new file mode 100644
index 00000000..5a1f8d09
--- /dev/null
+++ b/regress/roff/string/dotT.out_markdown
@@ -0,0 +1,21 @@
+STRING-DOTT(1) - General Commands Manual
+
+# NAME
+
+**string-dotT** - interpolating the device name
+
+# DESCRIPTION
+
+initial text
+
+BEGINTEST
+
+We are using the markdown device.
+
+The device name can be overridden.
+
+ENDTEST
+
+final text
+
+OpenBSD - August 16, 2018
diff --git a/regress/roff/string/dotT.out_utf8 b/regress/roff/string/dotT.out_utf8
new file mode 100644
index 00000000..827b3994
--- /dev/null
+++ b/regress/roff/string/dotT.out_utf8
@@ -0,0 +1,19 @@
+STRING-DOTT(1) General Commands Manual STRING-DOTT(1)
+
+NNAAMMEE
+ ssttrriinngg--ddoottTT – interpolating the device name
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ BEGINTEST
+
+ We are using the utf8 device.
+
+ The device name can be overridden.
+
+ ENDTEST
+
+ final text
+
+OpenBSD August 16, 2018 OpenBSD