Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev/modules/_lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ let
inputsFollow = lib.mapAttrs (
_: input:
mergeNonEmptyAttrs input {
follows = { };
follows = {
testEmpty = v: v == null; # allow empty follows string
Comment thread
vic marked this conversation as resolved.
};
inputs = nonEmptyInputs input;
}
);
Expand Down
11 changes: 11 additions & 0 deletions dev/modules/unit-tests/inputsExpr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ let
};
};

tests.inputsExpr."test on input with follows to empty" = {
expr = inputsExpr {
foo.url = "foo";
foo.inputs.bar.follows = "";
};
expected = {
foo.url = "foo";
foo.inputs.bar.follows = "";
};
};

in
{
flake = { inherit tests; };
Expand Down