1
0

run the output-template test

This commit is contained in:
Daniel Barlow 2025-02-22 00:10:19 +00:00
parent e1293e3778
commit 024c018262
3 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,3 @@
check:
./output-template '{{' '}}' < example.ini > output
fennelrepl ./test.fnl '{{' '}}' < example.ini > output
diff -u output example.ini.expected

View File

@ -2,6 +2,7 @@
fetchurl,
writeFennel,
fennel,
fennelrepl,
runCommand,
lua,
anoia,
@ -17,6 +18,7 @@ stdenv.mkDerivation {
src = ./.;
buildInputs = [ lua ];
nativeBuildInputs = [ fennelrepl ] ;
# doCheck = true;
buildPhase = ''
@ -31,6 +33,7 @@ stdenv.mkDerivation {
mainFunction = "run";
} ./watch-outputs.fnl
} ${name}
make check
'';
# checkPhase = "make check";
installPhase = ''

View File

@ -28,7 +28,7 @@
(fn [service-path path]
(let [s (assert (svc.open (.. service-path "/.outputs")))]
(s:output path)))
:lua_quote #(string.format "%q" %1)
:lua_quote #(string.format "%q" $1)
:json_quote (fn [x] (.. "\"" (json-escape x) "\""))
}]
(string.gsub text delim