summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 21:42:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 21:42:02 +0000
commit92fc4a31da7eb79879434d883684209266ac3ff2 (patch)
treee95551d6c9052f1c92423aee19c07cd2adb86de7 /regress
parentb33e04fa7bbe5f17c54a8a302bf93d8a56784800 (diff)
downloadmandoc-92fc4a31da7eb79879434d883684209266ac3ff2.tar.gz
Fix adding some minimal intelligence to conditional parser. See roff.7
for what's supported. This simplified the roff_cond() function quite nicely. From a bug report by uqs@. Added regression test based on bug-report example by uqs@. Also added ROFF_DEBUG to see what the hell the parser is actually doing. Obviously turned off by default.
Diffstat (limited to 'regress')
-rw-r--r--regress/roff/if/real0.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/regress/roff/if/real0.in b/regress/roff/if/real0.in
new file mode 100644
index 00000000..28f4aee4
--- /dev/null
+++ b/regress/roff/if/real0.in
@@ -0,0 +1,30 @@
+.Dd June 9, 2010
+.Dt TITLE 1
+.Os
+.Sh NAME
+.Nm test
+.Nd test
+.Sh SYNOPSIS
+foo
+.Sh DESCRIPTION
+to polar
+.if n\
+(r,theta)
+.if t\
+(r,\(*h)
+coordinates
+.if n\
+r\(**cos theta
+.if t\
+r\(**cos\(*h
+and y =
+.if n\
+r\(**sin theta.
+.if t\
+r\(**sin\(*h.
+These
+.if n \
+(r=0,theta=0).
+.if t \
+(r=0,\(*h=0).
+In