From fd5e9d2778f3eaebaab0e58a24eeea1fe678696c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= Date: Fri, 23 Feb 2024 15:51:01 +0100 Subject: [PATCH] Test the fetchtree implied experimental features Make sure that enabling `fetch-tree` also enables `fetch-tree-git` and `fetch-tree-urls`. --- tests/functional/config.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/functional/config.sh b/tests/functional/config.sh index 324fe95bd..66d04335a 100644 --- a/tests/functional/config.sh +++ b/tests/functional/config.sh @@ -50,8 +50,13 @@ exp_cores=$(nix config show | grep '^cores' | cut -d '=' -f 2 | xargs) exp_features=$(nix config show | grep '^experimental-features' | cut -d '=' -f 2 | xargs) [[ $prev != $exp_cores ]] [[ $exp_cores == "4242" ]] -# flakes implies fetch-tree -[[ $exp_features == "fetch-tree flakes nix-command" ]] +# flakes implies fetch-tree and a bunch of other things +[[ $exp_features == "fetch-tree fetch-tree-git fetch-tree-urls flakes nix-command" ]] +[[ + $(NIX_CONFIG="experimental-features = fetch-tree nix-command" nix config show | grep '^experimental-features' | cut -d '=' -f 2 | xargs) \ + == \ + "fetch-tree fetch-tree-git fetch-tree-urls nix-command" +]] # Test that it's possible to retrieve a single setting's value val=$(nix config show | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)