From 278fddc317cf0cf4d3602d0ec0f24d1dd281fadb Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 13 Jul 2024 07:55:17 +0200 Subject: libexpr: Deprecate URL literals Closes #437. Change-Id: I9f67fc965bb4a7e7fd849e5067ac1cb3bab064cd --- tests/functional/lang.sh | 7 ++++++- tests/functional/lang/parse-okay-regression-20041027.nix | 1 + tests/functional/lang/parse-okay-url.nix | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/functional') diff --git a/tests/functional/lang.sh b/tests/functional/lang.sh index 94c00bad0..aa41b41d8 100755 --- a/tests/functional/lang.sh +++ b/tests/functional/lang.sh @@ -53,8 +53,13 @@ done for i in lang/parse-okay-*.nix; do echo "parsing $i (should succeed)"; i=$(basename "$i" .nix) + # Hard-code that these two files are allowed to use url literals (because they test them) + if [[ "$i" == "parse-okay-url" || "$i" == "parse-okay-regression-20041027" ]] + then + extraArgs="--extra-deprecated-features url-literals" + fi if - expect 0 nix-instantiate --parse - < "lang/$i.nix" \ + expect 0 nix-instantiate --parse ${extraArgs-} - < "lang/$i.nix" \ 1> "lang/$i.out" \ 2> "lang/$i.err" then diff --git a/tests/functional/lang/parse-okay-regression-20041027.nix b/tests/functional/lang/parse-okay-regression-20041027.nix index ae2e256ee..541264b16 100644 --- a/tests/functional/lang/parse-okay-regression-20041027.nix +++ b/tests/functional/lang/parse-okay-regression-20041027.nix @@ -1,3 +1,4 @@ +# This test needs to be run with --extra-deprecated-features url-literals {stdenv, fetchurl /* pkgconfig, libX11 */ }: stdenv.mkDerivation { diff --git a/tests/functional/lang/parse-okay-url.nix b/tests/functional/lang/parse-okay-url.nix index 08de27d0a..f74a72bb1 100644 --- a/tests/functional/lang/parse-okay-url.nix +++ b/tests/functional/lang/parse-okay-url.nix @@ -1,3 +1,4 @@ +# This test needs to be run with --extra-deprecated-features url-literals [ x:x https://svn.cs.uu.nl:12443/repos/trace/trunk http://www2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 -- cgit v1.2.3