From 27f1545e0f756e82e793a38e1bc5a55d673a6261 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 16 Aug 2018 13:54:06 +0000 Subject: 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. --- regress/roff/string/Makefile | 5 ++++- regress/roff/string/dotT.in | 20 ++++++++++++++++++++ regress/roff/string/dotT.out_ascii | 19 +++++++++++++++++++ regress/roff/string/dotT.out_html | 7 +++++++ regress/roff/string/dotT.out_markdown | 21 +++++++++++++++++++++ regress/roff/string/dotT.out_utf8 | 19 +++++++++++++++++++ 6 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 regress/roff/string/dotT.in create mode 100644 regress/roff/string/dotT.out_ascii create mode 100644 regress/roff/string/dotT.out_html create mode 100644 regress/roff/string/dotT.out_markdown create mode 100644 regress/roff/string/dotT.out_utf8 (limited to 'regress/roff/string') 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 +
+We are using the html device. +
+The device name can be overridden. +
+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 -- cgit