staticjinja: add minimal template test
This commit is contained in:
@@ -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 @@
|
||||
World
|
||||
@@ -0,0 +1 @@
|
||||
Hello {% include './include' %}!
|
||||
Reference in New Issue
Block a user