aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/tests/primops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/tests/primops.cc')
-rw-r--r--src/libexpr/tests/primops.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/tests/primops.cc b/src/libexpr/tests/primops.cc
index bcdc7086b..9cdcf64a1 100644
--- a/src/libexpr/tests/primops.cc
+++ b/src/libexpr/tests/primops.cc
@@ -823,4 +823,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 */