Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
let
lib = import ../../..;
evaluation = lib.evalModules {
modules = [
{ }
(args: { })
./a.nix
./b.nix
];
};
actual = evaluation.graph;
expected = [
{
key = ":anon-1";
file = "<unknown-file>";
imports = [ ];
disabled = false;
}
{
key = ":anon-2";
file = "<unknown-file>";
imports = [ ];
disabled = false;
}
{
key = toString ./a.nix;
file = toString ./a.nix;
imports = [
{
key = "${toString ./a.nix}:anon-1";
file = toString ./a.nix;
imports = [
{
key = "${toString ./a.nix}:anon-1:anon-1";
file = toString ./a.nix;
imports = [ ];
disabled = false;
}
];
disabled = false;
}
];
disabled = false;
}
{
key = toString ./b.nix;
file = toString ./b.nix;
imports = [
{
key = "explicit-key";
file = toString ./b.nix;
imports = [ ];
disabled = false;
}
];
disabled = true;
}
];
in
assert actual == expected;
null