Skip to content

Commit 9d682c7

Browse files
iot-icorebergey
authored andcommitted
add tests
from #2 add a usage note about running the tests with a cabal sandbox
1 parent 1314b22 commit 9d682c7

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ TAGS
1515
.diagrams-cache
1616
/cabal.sandbox.config
1717
/.cabal-sandbox/
18+
test/images
19+
test/*.html
20+
/test/.cabal-sandbox

test/cleanTests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rm -rf images
2+
rm -rf *.html

test/test1.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Here is a square:
2+
3+
``` {.diagram}
4+
example = square 1
5+
```
6+

test/test2.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Here is a square:
2+
3+
``` {.diagram-haskell echo=Above}
4+
example = square 1
5+
```
6+

test/tests.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# run from the `test` directory
2+
3+
# diagrams-pandoc will use packages installed in a sandbox in the
4+
# directory from which it's run. It's sufficient that the `test`
5+
# directory have a symlink to the sandbox.
6+
7+
#test diagram
8+
pandoc -t html test1.md --filter diagrams-pandoc -o test1.html -s
9+
10+
#test diagram with code
11+
pandoc -t html test2.md --filter diagrams-pandoc -o test2.html -s

0 commit comments

Comments
 (0)