staticjinja: add minimal template test

This commit is contained in:
Francesco Gazzetta
2021-12-24 16:53:10 +01:00
parent 6e453fe75c
commit 937b599abe
4 changed files with 17 additions and 2 deletions
@@ -12,6 +12,7 @@
, testVersion
, tomlkit
, staticjinja
, callPackage
}:
buildPythonPackage rec {
@@ -51,8 +52,9 @@ buildPythonPackage rec {
export PATH="$PATH:$out/bin";
'';
passthru.tests.version = testVersion {
package = staticjinja;
passthru.tests = {
version = testVersion { package = staticjinja; };
minimal-template = callPackage ./test-minimal-template {};
};
meta = with lib; {
@@ -0,0 +1,11 @@
{ stdenv, staticjinja }:
stdenv.mkDerivation {
name = "staticjinja-test-minimal-template";
meta.timeout = 30;
buildCommand = ''
${staticjinja}/bin/staticjinja build --srcpath ${./templates}
grep 'Hello World!' index
touch $out
'';
}
@@ -0,0 +1 @@
Hello {% include './include' %}!