aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
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
commit31f17a62e510f4e0732d1c76e7a56a1a69506dc6 (patch)
tree3ebfa16f389b97a4bfa5988b198dad27b59d3fb5 /regress
parent44573b326d6604f3025f17909863711b17011d5f (diff)
downloadmandoc-31f17a62e510f4e0732d1c76e7a56a1a69506dc6.tar.gz
mandoc-31f17a62e510f4e0732d1c76e7a56a1a69506dc6.tar.zst
mandoc-31f17a62e510f4e0732d1c76e7a56a1a69506dc6.zip
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')
-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..06c544de
--- /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: August 16 2018 $
+.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