From 154501ddaa70d71f7a81a9e8cf2dda75cc48bb44 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 1 Jan 2011 21:14:10 +0000 Subject: test handling of zero-length user-defined strings --- regress/usr.bin/mandoc/roff/string/Makefile | 8 ++++++-- regress/usr.bin/mandoc/roff/string/zerolength.in | 16 ++++++++++++++++ regress/usr.bin/mandoc/roff/string/zerolength.out_ascii | 14 ++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 regress/usr.bin/mandoc/roff/string/zerolength.in create mode 100644 regress/usr.bin/mandoc/roff/string/zerolength.out_ascii (limited to 'regress/usr.bin/mandoc') diff --git a/regress/usr.bin/mandoc/roff/string/Makefile b/regress/usr.bin/mandoc/roff/string/Makefile index 5577da4097e..d415793d209 100644 --- a/regress/usr.bin/mandoc/roff/string/Makefile +++ b/regress/usr.bin/mandoc/roff/string/Makefile @@ -1,5 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2010/12/09 23:01:18 schwarze Exp $ +# $OpenBSD: Makefile,v 1.3 2011/01/01 21:14:09 schwarze Exp $ -REGRESS_TARGETS=escape infinite +REGRESS_TARGETS=escape infinite zerolength +GROFF_TARGETS=escape zerolength + +# The infinite test fails badly with groff-1.20.1: +# It fails to print the following text. .include diff --git a/regress/usr.bin/mandoc/roff/string/zerolength.in b/regress/usr.bin/mandoc/roff/string/zerolength.in new file mode 100644 index 00000000000..0d4d9bacc1f --- /dev/null +++ b/regress/usr.bin/mandoc/roff/string/zerolength.in @@ -0,0 +1,16 @@ +.TH STRING-ZEROLENGTH 1 "December 19, 2010" +.SH NAME +string-zerolength - handling of zero-length user-defined strings +.SH DESCRIPTION +.ds dszero " +.de dezero +.. +use zero-length string: +x\*[dszero]x +.dszero +x +.PP +use zero-length macro: +x\*[dezero]x +.dezero +x diff --git a/regress/usr.bin/mandoc/roff/string/zerolength.out_ascii b/regress/usr.bin/mandoc/roff/string/zerolength.out_ascii new file mode 100644 index 00000000000..d9cce86d952 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/string/zerolength.out_ascii @@ -0,0 +1,14 @@ +STRING-ZEROLENGTH(1) STRING-ZEROLENGTH(1) + + + +NNAAMMEE + string-zerolength - handling of zero-length user-defined strings + +DDEESSCCRRIIPPTTIIOONN + use zero-length string: xx x + + use zero-length macro: xx x + + + -- cgit v1.2.3