1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Rework error throwing, and test it

This commit is contained in:
Guillaume Maudoux 2022-10-25 01:46:10 +02:00
parent 8bd8583bc7
commit e93bf69b44
8 changed files with 190 additions and 102 deletions

View file

@ -836,4 +836,10 @@ namespace nix {
for (const auto [n, elem] : enumerate(v.listItems()))
ASSERT_THAT(*elem, IsStringEq(expected[n]));
}
TEST_F(PrimOpTest, genericClosure_not_strict) {
// Operator should not be used when startSet is empty
auto v = eval("builtins.genericClosure { startSet = []; }");
ASSERT_THAT(v, IsListOfSize(0));
}
} /* namespace nix */