diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-05-28 22:45:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-05-28 22:45:35 +0000 |
commit | e181695f9fdea338faa03af3a4db2abbb523b0f8 (patch) | |
tree | addbb4ae1bc5fb0b960a10a03dc2ac40edc6d331 /regress/usr.bin/mandoc | |
parent | 0318623ea5e73c19426dd575773ed902966ef2b9 (diff) |
While i already got my fingers dirty on mandoc_escape(),
profit of the occasion to pull out some spaghetti, that is,
three confusing variables and fourteen pointless assignments
among them; instead, always operate on the official pointers
**start, **end, and *sz, each of which conveys an obvious meaning.
No functional change intended, and the new tests confirm that
everything still (err...) "works", as far as that word can be
applied to the kind of roff(7) mock-up code i'm polishing here.
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/c.in | 13 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/c.out_ascii | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/f.in | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/f.out_ascii | 11 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/ignore.in | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/ignore.out_ascii | 11 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/multi.in | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/multi.out_ascii | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/one.in | 14 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/one.out_ascii | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/two.in | 75 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/two.out_ascii | 25 |
13 files changed, 216 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/roff/esc/Makefile b/regress/usr.bin/mandoc/roff/esc/Makefile index f8e95e9161c..e9705972a80 100644 --- a/regress/usr.bin/mandoc/roff/esc/Makefile +++ b/regress/usr.bin/mandoc/roff/esc/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.2 2012/05/28 17:08:48 schwarze Exp $ +# $OpenBSD: Makefile,v 1.3 2012/05/28 22:45:34 schwarze Exp $ -REGRESS_TARGETS=h z +REGRESS_TARGETS=one two multi c f h z ignore # Postprocessing to remove "character backspace" sequences # unless they are foolowed by the same character again. diff --git a/regress/usr.bin/mandoc/roff/esc/c.in b/regress/usr.bin/mandoc/roff/esc/c.in new file mode 100644 index 00000000000..be95f2bcd03 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/c.in @@ -0,0 +1,13 @@ +.Dd May 28, 2012 +.Dt ESC-C 1 +.Os OpenBSD +.Sh NAME +.Nm esc-c +.Nd the roff escape c sequence: remove trailing space +.Sh DESCRIPTION +No space between +.Dq one +and +.Dq word : +one\c +word diff --git a/regress/usr.bin/mandoc/roff/esc/c.out_ascii b/regress/usr.bin/mandoc/roff/esc/c.out_ascii new file mode 100644 index 00000000000..90ed2c99605 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/c.out_ascii @@ -0,0 +1,9 @@ +ESC-C(1) OpenBSD Reference Manual ESC-C(1) + +NNAAMMEE + eesscc--cc - the roff escape c sequence: remove trailing space + +DDEESSCCRRIIPPTTIIOONN + No space between ``one'' and ``word'': oneword + +OpenBSD May 28, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/roff/esc/f.in b/regress/usr.bin/mandoc/roff/esc/f.in new file mode 100644 index 00000000000..c6de2c297a8 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/f.in @@ -0,0 +1,12 @@ +.Dd May 28, 2012 +.Dt ESC-F 1 +.Os OpenBSD +.Sh NAME +.Nm esc-f +.Nd the roff escape f sequence: font changes +.Sh DESCRIPTION +numbers: \f3bold\f2italic\f1roman +.br +letters: \fBbold\fIitalic\fPback\fRroman +.br +multiletter: \f[B]bold\f[I]italic\f[P]back\f[R]roman diff --git a/regress/usr.bin/mandoc/roff/esc/f.out_ascii b/regress/usr.bin/mandoc/roff/esc/f.out_ascii new file mode 100644 index 00000000000..594c3a17625 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/f.out_ascii @@ -0,0 +1,11 @@ +ESC-F(1) OpenBSD Reference Manual ESC-F(1) + +NNAAMMEE + eesscc--ff - the roff escape f sequence: font changes + +DDEESSCCRRIIPPTTIIOONN + numbers: bboolldd_i_t_a_l_i_croman + letters: bboolldd_i_t_a_l_i_cbbaacckkroman + multiletter: bboolldd_i_t_a_l_i_cbbaacckkroman + +OpenBSD May 28, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/roff/esc/ignore.in b/regress/usr.bin/mandoc/roff/esc/ignore.in new file mode 100644 index 00000000000..a7350b87cc1 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/ignore.in @@ -0,0 +1,12 @@ +.Dd May 28, 2012 +.Dt ESC-IGNORE 1 +.Os OpenBSD +.Sh NAME +.Nm esc-ignore +.Nd ignored roff escape sequences +.Sh DESCRIPTION +multiform: a\kxb\k(xyc\k[xyz]d +.br +quoted: a\R'myreg 0'b\R'myreg \A'y'0'c +.br +sizes: a\s0b\s(12c\s[123]d\s'123'e\s'1\w'xy'2'f diff --git a/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii b/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii new file mode 100644 index 00000000000..9a936163d89 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii @@ -0,0 +1,11 @@ +ESC-IGNORE(1) OpenBSD Reference Manual ESC-IGNORE(1) + +NNAAMMEE + eesscc--iiggnnoorree - ignored roff escape sequences + +DDEESSCCRRIIPPTTIIOONN + multiform: abcd + quoted: abc + sizes: abcdef + +OpenBSD May 28, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/roff/esc/multi.in b/regress/usr.bin/mandoc/roff/esc/multi.in new file mode 100644 index 00000000000..a2a76db1e01 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/multi.in @@ -0,0 +1,10 @@ +.Dd May 28, 2012 +.Dt ESC-MULTI 1 +.Os OpenBSD +.Sh NAME +.Nm esc-multi +.Nd roff multi-character escape sequences +.Sh DESCRIPTION +\[tno] \[t+-] \[tmu] \[tdi] \[12] \[14] \[34] +.br +\C'tno' \C't+-' \C'tmu' \C'tdi' \C'12' \C'14' \C'34' diff --git a/regress/usr.bin/mandoc/roff/esc/multi.out_ascii b/regress/usr.bin/mandoc/roff/esc/multi.out_ascii new file mode 100644 index 00000000000..eb4ad133a28 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/multi.out_ascii @@ -0,0 +1,10 @@ +ESC-MULTI(1) OpenBSD Reference Manual ESC-MULTI(1) + +NNAAMMEE + eesscc--mmuullttii - roff multi-character escape sequences + +DDEESSCCRRIIPPTTIIOONN + ~ +- x -:- 1/2 1/4 3/4 + ~ +- x -:- 1/2 1/4 3/4 + +OpenBSD May 28, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/roff/esc/one.in b/regress/usr.bin/mandoc/roff/esc/one.in new file mode 100644 index 00000000000..caed6260cd6 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/one.in @@ -0,0 +1,14 @@ +.Dd May 28, 2012 +.Dt ESC-ONE 1 +.Os OpenBSD +.Sh NAME +.Nm esc-one +.Nd roff one-character escape sequences +.Sh DESCRIPTION +backslash: >\e< +.br +minus: >\-< +.br +acute: >\'< +.br +grave: >\`< diff --git a/regress/usr.bin/mandoc/roff/esc/one.out_ascii b/regress/usr.bin/mandoc/roff/esc/one.out_ascii new file mode 100644 index 00000000000..8fc54112b4b --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/one.out_ascii @@ -0,0 +1,12 @@ +ESC-ONE(1) OpenBSD Reference Manual ESC-ONE(1) + +NNAAMMEE + eesscc--oonnee - roff one-character escape sequences + +DDEESSCCRRIIPPTTIIOONN + backslash: >\< + minus: >-< + acute: >'< + grave: >`< + +OpenBSD May 28, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/roff/esc/two.in b/regress/usr.bin/mandoc/roff/esc/two.in new file mode 100644 index 00000000000..6a5d222ccbb --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/two.in @@ -0,0 +1,75 @@ +.Dd May 28, 2012 +.Dt ESC-TWO 1 +.Os OpenBSD +.Sh NAME +.Nm esc-two +.Nd roff two-character escape sequences +.Sh DESCRIPTION +lines: \(ba \(br \(ul \(bb \(sl \(rs +.\" groff doesn't know \(rl +.br +markers: \(bu \(lz \(sq \(ps \(sc \(lh \(rh \(at \(sh \(CR +.\" the circle \(ci differs +.\" the daggers \(dd and \(dg use backspace +.\" groff doesn't know \(OK +.br +legal: \(co \(rg \(tm +.br +punctuation: \(em \(en \(hy +.\" the inverted punctuation \(r! and \(r? use backspace +.br +quotes: \(Bq \(bq \(oq \(cq \(aq \(dq \(Fo \(Fc \(fo \(fc +.\" the double quotes \(lq and \(rq differ +.br +brackets: \(lB \(rB \(lC \(rC \(la \(ra \(bv \(lt \(lk \(rt \(rk \(rb +.\" the left bottom \(lb differs +.br +arrows: \(<- \(-> \(lA \(rA \(hA +.\" the left-right arrow \(<> differs +.\" groff doesn't know \(va and \(vA +.\" the vertical arrows \(da, \(ua, \(uA, \(dA use backspace +.br +logical: \(AN \(OR \(no \(te \(st \(tf \(3d \(or +.\" the universal quantifier \(fa uses backspace +.br +mathematical: \(pl \(mi \(-+ \(+- \(pc \(mu \(di \(f/ \(** +\(<= \(>= \(<< \(>> \(eq \(!= \(== \(ne \(=~ \(ap \(~~ \(~= \(pt +\(es \(mo \(sb \(sp \(ca \(cu +\(sr \(lc \(rc \(lf \(rf \(if \(Ah \(Im \(Re \(pd +.\" groff doesn't know \(-~, \(nb, \(nc, \(-h +.\" these differ: \(nm \(ib \(ip \(/_ \(pp \(gr +.\" these use backspace: \(c* \(c+ \(is +.br +ligatures: \(ff \(fi \(fl \(Fi \(Fl \(AE \(ae \(OE \(oe \(IJ \(ij +.\" the German eszett \(ss differs +.br +accents: \(a" \(a^ \(aa \(ga \(ac \(ad \(ah \(ao \(a~ \(ho \(ha \(ti +.\" the macron \(a- differs +.\" groff doesn't know \(a. +.\" the breve \(ab uses backspace +.br +.\" accented and special letters all use backspace: +.\" \('A \('E \('I \('O \('U \('a \('e \('i \('o \('u +.\" \(`A \(`E \(`I \(`O \(`U \(`a \(`e \(`i \(`o \(`u +.\" \(~A \(~N \(~O \(~a \(~n \(~o +.\" \(:A \(:E \(:I \(:O \(:U \(:a \(:e \(:i \(:o \(:u \(:y +.\" \(^A \(^E \(^I \(^O \(^U \(^a \(^e \(^i \(^o \(^u +.\" \(,C \(,c \(/L \(/l \(/O \(/o \(oA \(oa +.\" \(-D \(Sd \(TP \(Tp +.\" except: +special letter: \(.i +.\" groff doesn't know \(.j +.br +currency: \(Do \(Eu \(eu \(Fo +.\" these use backspace: \(ct \(Ye \(Po \(Cs +.br +units: \(de \(fm +.\" groff doesn't know \(%O, and \(sd and \(mc differ +.br +greek letters: \(*A \(*B \(*E \(*Z \(*Y \(*I \(*K \(*L +\(*M \(*N \(*O \(*P \(*R \(*T \(*U \(*X +\(*a \(*b \(*g \(*d \(*e \(*y \(*i \(*k +\(*n \(*o \(*r \(*u \(*x \(*w \(+e \(ts +.\" these differ: \(*G \(*S \(*F +.\" these use backspace: \(*D \(*H \(*C \(*Q \(*W +.\" \(*z \(*h \(*l \(*m \(*c \(*p \(*s \(*t \(*f \(*q \(+h \(+f \+p diff --git a/regress/usr.bin/mandoc/roff/esc/two.out_ascii b/regress/usr.bin/mandoc/roff/esc/two.out_ascii new file mode 100644 index 00000000000..d1960bc0bef --- /dev/null +++ b/regress/usr.bin/mandoc/roff/esc/two.out_ascii @@ -0,0 +1,25 @@ +ESC-TWO(1) OpenBSD Reference Manual ESC-TWO(1) + +NNAAMMEE + eesscc--ttwwoo - roff two-character escape sequences + +DDEESSCCRRIIPPTTIIOONN + lines: | | _ | / \ + markers: o <> [] 9| S <= => @ # _| + legal: (C) (R) tm + punctuation: -- - - + quotes: ,, , ` ' ' " << >> < > + brackets: [ ] { } < > | ,- { -. } -' + arrows: <- -> <= => <=> + logical: ^ v ~ 3 -) .:. .:. | + mathematical: + - -+ +- . x -:- / * <= >= << >> = != == !== =~ ~ ~~ ~= oc + {} E (= =) (^) U \/ |~ ~| |_ _| oo N I R a + ligatures: ff fi fl ffi ffl AE ae OE oe IJ ij + accents: " ^ ' ` , " v o ~ , ^ ~ + special letter: i + currency: $ EUR EUR << + units: o ' + greek letters: A B E Z H I K /\ M N O TT P T Y X a B y d e n i k v o p u + x w e s + +OpenBSD May 28, 2012 OpenBSD |