diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-10 21:42:02 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-10 21:42:02 +0000 |
commit | 151317239c987cf45872d3ee4ec105feb30ddcc9 (patch) | |
tree | a174ca825d0104808fab8d5aaaf3c01fc2bf45f1 /regress/roff/if | |
parent | f9e4d0ae086987ed162fde69bc3ae4c3048ff293 (diff) | |
download | mandoc-151317239c987cf45872d3ee4ec105feb30ddcc9.tar.gz mandoc-151317239c987cf45872d3ee4ec105feb30ddcc9.tar.zst mandoc-151317239c987cf45872d3ee4ec105feb30ddcc9.zip |
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/roff/if')
-rw-r--r-- | regress/roff/if/real0.in | 30 |
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 |