2025-09-17 11:59:53 +02:00
|
|
|
{
|
|
|
|
|
ntlib,
|
|
|
|
|
devshell,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
|
|
|
|
module = ./taskfile.nix;
|
|
|
|
|
in {
|
|
|
|
|
suites."Taskfile" = {
|
|
|
|
|
pos = __curPos;
|
|
|
|
|
tests = [
|
|
|
|
|
{
|
|
|
|
|
name = "basic";
|
|
|
|
|
type = "script";
|
|
|
|
|
script = let
|
|
|
|
|
shell = devshell.mkShell {
|
|
|
|
|
imports = [module];
|
2025-12-19 16:05:00 +01:00
|
|
|
task."default" = {};
|
2025-09-17 11:59:53 +02:00
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
# sh
|
|
|
|
|
''
|
|
|
|
|
${ntlib.helpers.scriptHelpers}
|
|
|
|
|
assert "-f ${shell}/bin/task" "/bin/task should exist"
|
|
|
|
|
'';
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = "alias";
|
|
|
|
|
type = "script";
|
|
|
|
|
script = let
|
|
|
|
|
shell = devshell.mkShell {
|
|
|
|
|
imports = [module];
|
2025-12-19 16:05:00 +01:00
|
|
|
task."," = {};
|
2025-09-17 11:59:53 +02:00
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
# sh
|
|
|
|
|
''
|
|
|
|
|
${ntlib.helpers.scriptHelpers}
|
|
|
|
|
assert "-f ${shell}/bin/," "/bin/, should exist"
|
|
|
|
|
'';
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
}
|