diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-10 23:53:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-10 23:53:33 +0000 |
commit | 32091ea77a0c9b3c6bdba26aa50d7d9212d45bd3 (patch) | |
tree | 4daa44cc742082a1a350500d2d405287c8ed8648 /regress | |
parent | 0da47356692d60755345bd20924a410a62488591 (diff) |
Refactoring in preparation for .rm support:
Unify parsing of names given as roff request arguments into a new
function roff_getname(), which is rather different from the parsing
function for normal arguments, mandoc_getarg(), because names cannot
be quoted and cannot contain whitespace or escaped characters.
The new function now throws an ERROR when finding escaped characters
in a name.
"I'm fine with this." kristaps@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/name.in | 33 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/string/name.out_ascii | 16 |
3 files changed, 52 insertions, 3 deletions
diff --git a/regress/usr.bin/mandoc/roff/string/Makefile b/regress/usr.bin/mandoc/roff/string/Makefile index d415793d209..b3487fcc7b5 100644 --- a/regress/usr.bin/mandoc/roff/string/Makefile +++ b/regress/usr.bin/mandoc/roff/string/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.3 2011/01/01 21:14:09 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2011/01/10 23:53:32 schwarze Exp $ -REGRESS_TARGETS=escape infinite zerolength -GROFF_TARGETS=escape zerolength +REGRESS_TARGETS=escape infinite zerolength name +GROFF_TARGETS=escape zerolength name # The infinite test fails badly with groff-1.20.1: # It fails to print the following text. diff --git a/regress/usr.bin/mandoc/roff/string/name.in b/regress/usr.bin/mandoc/roff/string/name.in new file mode 100644 index 00000000000..cee60ffd42d --- /dev/null +++ b/regress/usr.bin/mandoc/roff/string/name.in @@ -0,0 +1,33 @@ +.Dd January 10, 2011 +.Dt STRING-NAME 1 +.Os +.Sh NAME +.Nm string-name +.Nd torturing .ds with weird string names +.Sh DESCRIPTION +.ds norm value of norm +.ds "quot" value of "quot" +.ds bs\e value of bs\ee +.ds bs\\e value of bs\e\ee +.ds bl\ e value of bl\e e +norm: \*[norm] +.br +quot: \*[quot] +.br +"quot": \*["quot"] +.br +bs\e\ee: \*[bs\\e] +.\".br +.\"bs\ee: \*[bs\e] +.br +bse: \*[bse] +.br +bs: \*[bs] +.\".br +.\"bl\e e: \*[bl\ e] +.br +bl e: \*[bl e] +.br +ble: \*[ble] +.br +bl: \*[bl] diff --git a/regress/usr.bin/mandoc/roff/string/name.out_ascii b/regress/usr.bin/mandoc/roff/string/name.out_ascii new file mode 100644 index 00000000000..81b0a65aadd --- /dev/null +++ b/regress/usr.bin/mandoc/roff/string/name.out_ascii @@ -0,0 +1,16 @@ +STRING-NAME(1) OpenBSD Reference Manual STRING-NAME(1) + +NNAAMMEE + ssttrriinngg--nnaammee - torturing .ds with weird string names + +DDEESSCCRRIIPPTTIIOONN + norm: value of norm + quot: + "quot": value of "quot" + bs\\e: value of bs\\e + bse: + bs: + bl e: + ble: + bl: + |