Add test for pluginWrapper with fn input and tests for lazyPluginClosure.
This commit is contained in:
parent
5342429193
commit
feef4d0931
1 changed files with 14 additions and 0 deletions
|
@ -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}"}'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue