Add test for pluginWrapper with fn input and tests for lazyPluginClosure.

This commit is contained in:
Kevin Baensch 2024-11-30 17:22:51 +01:00
parent 5342429193
commit feef4d0931
Signed by: derped
GPG key ID: C0F1D326C7626543

View file

@ -120,6 +120,10 @@ in
dir = miniDrv; dir = miniDrv;
}; };
}; };
testFn = {
expr = (lazyUtils.helpers.pluginWrapper (_: "test")).dir null;
expected = "test";
};
testSet = { testSet = {
expr = lazyUtils.helpers.pluginWrapper { }; expr = lazyUtils.helpers.pluginWrapper { };
expected = { }; expected = { };
@ -130,4 +134,14 @@ in
}; };
}; };
}; };
lazyPluginClosure = {
testShort = {
expr = lazyUtils.lazyPluginClosure "pluginName";
expected = ''{"pluginName",name = "pluginName"}'';
};
testDrv = {
expr = lazyUtils.lazyPluginClosure miniDrv;
expected = ''{dir = "${miniDrv.outPath}",name = "${miniDrv.name}"}'';
};
};
} }