summaryrefslogtreecommitdiffstats
path: root/regress/roff/char
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-25 16:53:38 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-25 16:53:38 +0000
commit7582daff204d17b170462dc6b7f6fd218be6afc9 (patch)
treeff78b1959cd4fa9d7a802eb91fa11f10dc2f9e1e /regress/roff/char
parent4208da29a6d83d71a70576139d86e6a306290132 (diff)
downloadmandoc-7582daff204d17b170462dc6b7f6fd218be6afc9.tar.gz
Rudimentary implementation of the roff(7) .char (output glyph
definition) request, used for example by groff_hdtbl(7). This simplistic implementation may interact incorrectly with the .tr (input character translation) request. But come on, you are not only using .char *and* .tr, but you do so with respect to the same character in the same manual page?
Diffstat (limited to 'regress/roff/char')
-rw-r--r--regress/roff/char/Makefile6
-rw-r--r--regress/roff/char/badarg.in10
-rw-r--r--regress/roff/char/badarg.out_ascii13
-rw-r--r--regress/roff/char/badarg.out_lint6
-rw-r--r--regress/roff/char/basic.in11
-rw-r--r--regress/roff/char/basic.out_ascii13
6 files changed, 59 insertions, 0 deletions
diff --git a/regress/roff/char/Makefile b/regress/roff/char/Makefile
new file mode 100644
index 00000000..ebd68458
--- /dev/null
+++ b/regress/roff/char/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2018/08/25 16:43:52 schwarze Exp $
+
+REGRESS_TARGETS = basic badarg
+LINT_TARGETS = badarg
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/char/badarg.in b/regress/roff/char/badarg.in
new file mode 100644
index 00000000..3b343640
--- /dev/null
+++ b/regress/roff/char/badarg.in
@@ -0,0 +1,10 @@
+.\" $OpenBSD: badarg.in,v 1.1 2018/08/25 16:43:52 schwarze Exp $
+.TH CHAR-BADARG 1 "August 25, 2018"
+.SH NAME
+char-badarg \(en char requests with invalid arguments
+.SH DESCRIPTION
+.char
+.char \fR myval
+.char \[myc]x myval
+.char xy myval
+myc: <\[myc]> x
diff --git a/regress/roff/char/badarg.out_ascii b/regress/roff/char/badarg.out_ascii
new file mode 100644
index 00000000..287479a8
--- /dev/null
+++ b/regress/roff/char/badarg.out_ascii
@@ -0,0 +1,13 @@
+CHAR-BADARG(1) General Commands Manual CHAR-BADARG(1)
+
+
+
+NNAAMMEE
+ char-badarg - char requests with invalid arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ myc: <> x
+
+
+
+OpenBSD August 25, 2018 CHAR-BADARG(1)
diff --git a/regress/roff/char/badarg.out_lint b/regress/roff/char/badarg.out_lint
new file mode 100644
index 00000000..e07faa3c
--- /dev/null
+++ b/regress/roff/char/badarg.out_lint
@@ -0,0 +1,6 @@
+mandoc: badarg.in:6:6: ERROR: argument is not a character: char
+mandoc: badarg.in:7:7: ERROR: argument is not a character: char \fR myval
+mandoc: badarg.in:8:7: WARNING: invalid escape sequence: \[myc]
+mandoc: badarg.in:8:7: ERROR: argument is not a character: char \[myc]x myval
+mandoc: badarg.in:9:7: ERROR: argument is not a character: char xy myval
+mandoc: badarg.in:10:7: WARNING: invalid escape sequence: \[myc]
diff --git a/regress/roff/char/basic.in b/regress/roff/char/basic.in
new file mode 100644
index 00000000..cfa1880a
--- /dev/null
+++ b/regress/roff/char/basic.in
@@ -0,0 +1,11 @@
+.\" $OpenBSD: basic.in,v 1.1 2018/08/25 16:43:52 schwarze Exp $
+.TH CHAR-BASIC 1 "August 25, 2018"
+.SH NAME
+char-basic \(en the char request
+.SH DESCRIPTION
+initial text
+.char \[myc] myval
+.char x y
+.char \[boldX] \fBX
+\[boldX] \[myc]
+final text
diff --git a/regress/roff/char/basic.out_ascii b/regress/roff/char/basic.out_ascii
new file mode 100644
index 00000000..85207cee
--- /dev/null
+++ b/regress/roff/char/basic.out_ascii
@@ -0,0 +1,13 @@
+CHAR-BASIC(1) General Commands Manual CHAR-BASIC(1)
+
+
+
+NNAAMMEE
+ char-basic - the char request
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text XX myval final teyt
+
+
+
+OpenBSD August 25, 2018 CHAR-BASIC(1)