summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-07 02:21:56 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-07 02:21:56 +0000
commitbc2c9ee155b2d4b4eb2db65cf37b612b1ec03717 (patch)
tree73a8c0810f323b72dc4c554bfdbb6d1bdbff9de7 /regress/usr.bin
parent0b56353ae7f4b5222f6f5d82cba4369062bfd175 (diff)
Three bugfixes related to the closing of conditional blocks:
1. Handle more than one `\}' on macro lines, as it was already done for text lines. 2. Do not treat `\}' as a macro invocation after a dot at the beginning of a line. That allows more than one `\}' to work on lines starting with `.\}'. It also simplifies the code. 3. Do not complain about characters following `\}'. Those are not lost, but handled normally both on text and macro lines.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/mandoc/roff/cond/if.in28
-rw-r--r--regress/usr.bin/mandoc/roff/cond/if.out_ascii4
2 files changed, 28 insertions, 4 deletions
diff --git a/regress/usr.bin/mandoc/roff/cond/if.in b/regress/usr.bin/mandoc/roff/cond/if.in
index a9a5779d9b1..c65a1dcb1cc 100644
--- a/regress/usr.bin/mandoc/roff/cond/if.in
+++ b/regress/usr.bin/mandoc/roff/cond/if.in
@@ -13,13 +13,18 @@ False condition with whitespace:
.if t
True condition with whitespace:
.if n
-.if n \{One-line true condition with block.\}
-.if t \{One-line false condition with block.\}
+.if n \{One-line true condition\} with block.
+.if t \{One-line false condition\} with block.
.br
.if n \{Two-line true condition
-without continuation and macros.\}
+without continuation\} and macros.
.if t \{Two-line false condition
-without continuation and macros.\}
+without continuation\} and macros.
+.br
+.if n \{Two-line true condition
+.B without continuation\} but with macros.
+.if t \{Two-line false condition
+.B without continuation\} but with macros.
.br
.if n \{\
Two-line true condition
@@ -58,3 +63,18 @@ without continuation and macros.\}
without continuation and macros.\}
.br
Back to the outer false condition.\}
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+inner\}middle\}end
+After conditional.
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+.\}middle\}end
+After conditional.
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+.B\}middle\}end
+After conditional.
diff --git a/regress/usr.bin/mandoc/roff/cond/if.out_ascii b/regress/usr.bin/mandoc/roff/cond/if.out_ascii
index 3e6b5e98257..d4e52a569c9 100644
--- a/regress/usr.bin/mandoc/roff/cond/if.out_ascii
+++ b/regress/usr.bin/mandoc/roff/cond/if.out_ascii
@@ -13,6 +13,7 @@ DDEESSCCRRIIPPTTIIOONN
One-line true condition with block.
Two-line true condition without continuation and macros.
+ Two-line true condition wwiitthhoouutt ccoonnttiinnuuaattiioonn bbuutt wwiitthh mmaaccrrooss..
Two-line true condition with continuation and macros.
Two-line true condition with blank line.
@@ -20,6 +21,9 @@ DDEESSCCRRIIPPTTIIOONN
Inner one-line true condition.
Inner two-line true condition without continuation and macros.
Back to the outer true condition.
+ Outer true condition. After conditional.
+ Outer true condition. After conditional.
+ Outer true condition. After conditional.