Skip to content

Commit

Permalink
Extend coverage of preprocessor specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Jul 28, 2019
1 parent efb5ca0 commit bbce539
Show file tree
Hide file tree
Showing 15 changed files with 354 additions and 81 deletions.
299 changes: 218 additions & 81 deletions test/2.2-groff.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions test/fixtures/troff/chem-ascii.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Before
----+ ----+
| |
+-------+

After
6 changes: 6 additions & 0 deletions test/fixtures/troff/chem-utf8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Before
────┐ ────┐
│ │
└───────┘

After
11 changes: 11 additions & 0 deletions test/fixtures/troff/chem.roff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Before
.cstart
size 20
bond right
bond down
bond right
bond right
bond up
bond left
.cend
After
5 changes: 5 additions & 0 deletions test/fixtures/troff/eqn-bad.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Let αi be the primary variable, and let β be zero.
Then we can show that x1 is ≥0.

Foo {x1 + x2 = y
} bar baz.
7 changes: 7 additions & 0 deletions test/fixtures/troff/eqn-off.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
delim $$
Let $alpha sub i$ be the primary variable, and let $beta$ be zero.
Then we can show that $x sub 1$ is $>=0$.

delim {}
Foo {x1 + x2 = y
} bar {baz}.
4 changes: 4 additions & 0 deletions test/fixtures/troff/eqn-on.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Let αi be the primary variable, and let β be zero.
Then we can show that x1 is ≥0.

Foo x1+x2=y bar baz.
12 changes: 12 additions & 0 deletions test/fixtures/troff/eqn.roff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.nf
.EQ
delim $$
.EN
Let $alpha sub i$ be the primary variable, and let $beta$ be zero.
Then we can show that $x sub 1$ is $>=0$.
.sp 1
.EQ
delim {}
.EN
Foo {x1 + x2 = y
} bar {baz}.
2 changes: 2 additions & 0 deletions test/fixtures/troff/markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.\" so link.2
This _is_ a **weak** markup language.
12 changes: 12 additions & 0 deletions test/fixtures/troff/pic-ascii.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Before
+------+ +------+
| +-----| |
| Foo | | Bar |
+------+ +--+---+
|
|
+--+---+
| |
| Baz |
+------+
After
12 changes: 12 additions & 0 deletions test/fixtures/troff/pic-utf8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Before
┌──────┐ ┌──────┐
│ ├─────│ │
│ Foo │ │ Bar │
└──────┘ └──┬───┘
┌──┴───┐
│ │
│ Baz │
└──────┘
After
10 changes: 10 additions & 0 deletions test/fixtures/troff/pic.roff
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Before
.PS
box "Foo"
line right
box "Bar"
move to last box.s
line down
box "Baz"
.PE
After
13 changes: 13 additions & 0 deletions test/fixtures/troff/tbl-ascii.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Before
+-----+--------+
|0000 | foobar |
+-----+--------+
|1111 | |
|2222 | |
+-----+ |
| r | foo |
+-----+--------+
|3333 | |
|4444 | bar |
+-----+--------+
After
13 changes: 13 additions & 0 deletions test/fixtures/troff/tbl-utf8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Before
┌─────┬────────┐
│0000 │ foobar │
├─────┼────────┤
│1111 │ │
│2222 │ │
├─────┤ │
│ r │ foo │
├─────┼────────┤
│3333 │ │
│4444 │ bar │
└─────┴────────┘
After
23 changes: 23 additions & 0 deletions test/fixtures/troff/tbl.roff
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Before
.TS
tab(;) allbox;
l l
l ld
r ^
l rd.
0000;foobar
T{
1111
.br
2222
T};foo
r;
T{
3333
.br
4444
T};bar
\^;\^
.TE
.sp 1
After

0 comments on commit bbce539

Please sign in to comment.