Skip to content

Commit 2833e88

Browse files
avermstarleb
authored andcommitted
Add a test for groff output to pagebreak.lua.
1 parent 0cc4fe7 commit 2833e88

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

pagebreak/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
DIFF ?= diff --strip-trailing-cr -u
22

3-
test:
3+
test: test-html test-md
4+
5+
test-html:
46
@pandoc --lua-filter=pagebreak.lua sample.md | $(DIFF) expected.html -
57

6-
.PHONY: test
8+
test-md:
9+
@pandoc -t ms --lua-filter=pagebreak.lua sample.md | $(DIFF) expected.ms -
10+
11+
.PHONY: test test-html test-md

pagebreak/expected.ms

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.LP
2+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
3+
Donec hendrerit tempor tellus.
4+
Donec pretium posuere tellus.
5+
.bp
6+
.PP
7+
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
8+
ridiculus mus.
9+
Nulla posuere.
10+
Donec vitae dolor.
11+
.bp
12+
.PP
13+
Pellentesque dapibus suscipit ligula.
14+
Donec posuere augue in quam.
15+
Suspendisse potenti.
16+
.PP
17+
Final paragraph without a preceding pagebreak.

0 commit comments

Comments
 (0)