Paragraph testing
This commit is contained in:
parent
135b878233
commit
2e66b03baa
10 changed files with 80 additions and 2 deletions
18
test/djotToHtml/001-paragraph/Main.idr
Normal file
18
test/djotToHtml/001-paragraph/Main.idr
Normal file
|
@ -0,0 +1,18 @@
|
|||
module Main
|
||||
|
||||
import SSG.Djot
|
||||
import SSG.HTML
|
||||
|
||||
import System
|
||||
import System.File
|
||||
|
||||
main : IO ()
|
||||
main = do
|
||||
Right contents <- readFile "./test.dj"
|
||||
| Left err => do
|
||||
printLn err
|
||||
exitFailure
|
||||
let (_ ** blocks) = block contents
|
||||
let html = renderDocument blocks
|
||||
let output = render html
|
||||
putStrLn output
|
12
test/djotToHtml/001-paragraph/expected
Normal file
12
test/djotToHtml/001-paragraph/expected
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang=en>
|
||||
<body>
|
||||
<p>Hello World!</p>
|
||||
<p>Hello Alice!</p>
|
||||
<p>A Multi-line
|
||||
Paragraph</p>
|
||||
<p>Two line breaks</p>
|
||||
<p>A multiline paragraph
|
||||
with some indentation</p>
|
||||
</body>
|
||||
</html>
|
5
test/djotToHtml/001-paragraph/pack.toml
Normal file
5
test/djotToHtml/001-paragraph/pack.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
[custom.all.SSG]
|
||||
type = "local"
|
||||
path = "../../.."
|
||||
ipkg = "SSG.ipkg"
|
||||
test = "test/test.ipkg"
|
6
test/djotToHtml/001-paragraph/run
Normal file
6
test/djotToHtml/001-paragraph/run
Normal file
|
@ -0,0 +1,6 @@
|
|||
rm -rf build/
|
||||
|
||||
flock "$1" pack -q install-deps test.ipkg
|
||||
pack -q run test.ipkg
|
||||
|
||||
rm -rf build/
|
12
test/djotToHtml/001-paragraph/test.dj
Normal file
12
test/djotToHtml/001-paragraph/test.dj
Normal file
|
@ -0,0 +1,12 @@
|
|||
Hello World!
|
||||
|
||||
Hello Alice!
|
||||
|
||||
A Multi-line
|
||||
Paragraph
|
||||
|
||||
|
||||
Two line breaks
|
||||
|
||||
A multiline paragraph
|
||||
with some indentation
|
9
test/djotToHtml/001-paragraph/test.ipkg
Normal file
9
test/djotToHtml/001-paragraph/test.ipkg
Normal file
|
@ -0,0 +1,9 @@
|
|||
package a-test
|
||||
|
||||
depends = SSG
|
||||
, hedgehog
|
||||
, eff
|
||||
|
||||
main = Main
|
||||
|
||||
executable = test
|
Loading…
Add table
Add a link
Reference in a new issue