diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-01 21:14:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-01 21:14:10 +0000 |
commit | 154501ddaa70d71f7a81a9e8cf2dda75cc48bb44 (patch) | |
tree | 31c521bac436210dd2330c9ae544260bfd6330c0 | |
parent | faac4ef02585db9bb9d4c1839b042335df8edbdd (diff) |
test handling of zero-length user-defined strings
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/Makefile | 8 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/zerolength.in | 16 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/zerolength.out_ascii | 14 |
3 files changed, 36 insertions, 2 deletions
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 <bsd.regress.mk> 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 + + + |