Setup golden value testing

This commit is contained in:
Nathan McCarty 2025-02-21 15:29:25 -05:00
parent 4e83ca8d48
commit 72b102d071
10 changed files with 50 additions and 6 deletions

View file

@ -0,0 +1,16 @@
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 parsed = djot contents
putStr . render . renderHtml $ parsed

View file

@ -0,0 +1,6 @@
<!DOCTYPE HTML>
<html lang=en>
<body>
<p>Hello World!</p>
</body>
</html>

View file

@ -0,0 +1,6 @@
rm -rf build/
flock "$1" pack -q install-deps test.ipkg
pack -q run test.ipkg
rm -rf build/

View file

@ -0,0 +1 @@
Hello World!

View file

@ -0,0 +1,7 @@
package a-test
depends = SSG
main = Main
executable = test