aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libexpr/primops.cc
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-03-17 00:24:42 -0700
committerJade Lovelace <lix@jade.fyi>2024-03-17 00:32:19 -0700
commit886a418d23c6d4412c5d0d5c6280bb7a818def2b (patch)
tree6f2fccbaad7889c1dc1aa182257dee8725006092 /tests/unit/libexpr/primops.cc
parent11f35afa6f7933d1640e55473a8c7a153bf89b14 (diff)
builtins.nixVersion: return fixed fake version
This builtin is only going to cause us problems because we are not Nix, so let's just falsify being in the 2.18 series, since that is the closest target that has any meaning. In future we might want to have a better feature detection mechanism, for when we actually add stuff to some builtin's attr set argument. But builtins.nixVersion is just going to be hopelessly broken and it should be stubbed out. Fixes https://git.lix.systems/lix-project/lix/issues/144 Change-Id: Id7390b32a29c6147f2977737d81846320de5d67e
Diffstat (limited to 'tests/unit/libexpr/primops.cc')
-rw-r--r--tests/unit/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/libexpr/primops.cc b/tests/unit/libexpr/primops.cc
index 71e838b32..bd174a6c0 100644
--- a/tests/unit/libexpr/primops.cc
+++ b/tests/unit/libexpr/primops.cc
@@ -611,7 +611,7 @@ namespace nix {
TEST_F(PrimOpTest, nixVersion) {
auto v = eval("builtins.nixVersion");
- ASSERT_THAT(v, IsStringEq(nixVersion));
+ ASSERT_THAT(v, IsStringEq("2.18.3-lix"));
}
TEST_F(PrimOpTest, currentSystem) {