aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libexpr
diff options
context:
space:
mode:
authorpiegames <git@piegames.de>2024-07-13 07:55:17 +0200
committerpiegames <git@piegames.de>2024-08-17 20:31:57 +0200
commit278fddc317cf0cf4d3602d0ec0f24d1dd281fadb (patch)
tree002c63288018f70755e2a60f9af554fe5cbca85b /tests/unit/libexpr
parent49d61b2e4bf338042364c85d3c2ead0b33963e65 (diff)
libexpr: Deprecate URL literals
Closes #437. Change-Id: I9f67fc965bb4a7e7fd849e5067ac1cb3bab064cd
Diffstat (limited to 'tests/unit/libexpr')
-rw-r--r--tests/unit/libexpr/trivial.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/libexpr/trivial.cc b/tests/unit/libexpr/trivial.cc
index 46f9b7499..905e258bc 100644
--- a/tests/unit/libexpr/trivial.cc
+++ b/tests/unit/libexpr/trivial.cc
@@ -87,15 +87,15 @@ namespace nix {
}
TEST_F(TrivialExpressionTest, urlLiteral) {
- auto v = eval("https://nixos.org");
+ FeatureSettings mockFeatureSettings;
+ mockFeatureSettings.set("deprecated-features", "url-literals");
+
+ auto v = eval("https://nixos.org", true, mockFeatureSettings);
ASSERT_THAT(v, IsStringEq("https://nixos.org"));
}
TEST_F(TrivialExpressionTest, noUrlLiteral) {
- ExperimentalFeatureSettings mockXpSettings;
- mockXpSettings.set("experimental-features", "no-url-literals");
-
- ASSERT_THROW(eval("https://nixos.org", true, mockXpSettings), Error);
+ ASSERT_THROW(eval("https://nixos.org"), Error);
}
TEST_F(TrivialExpressionTest, withFound) {