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.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libexpr/tests/primops.cc b/src/libexpr/tests/primops.cc
index 49fbc5e98..9cdcf64a1 100644
--- a/src/libexpr/tests/primops.cc
+++ b/src/libexpr/tests/primops.cc
@@ -604,7 +604,7 @@ namespace nix {
TEST_F(PrimOpTest, storeDir) {
auto v = eval("builtins.storeDir");
- ASSERT_THAT(v, IsStringEq("/nix/store"));
+ ASSERT_THAT(v, IsStringEq(settings.nixStore));
}
TEST_F(PrimOpTest, nixVersion) {
@@ -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 */