Write test, will fail until rest of PR
This commit is contained in:
parent
e37f436eb4
commit
1b6c96bbcb
23
tests/experimental-features.sh
Normal file
23
tests/experimental-features.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
source common.sh
|
||||
|
||||
# Without flakes, flake options should not show up
|
||||
# With flakes, flake options should show up
|
||||
|
||||
function both_ways {
|
||||
nix --experimental-features 'nix-command' "$@" | grepQuietInverse flake
|
||||
nix --experimental-features 'nix-command flakes' "$@" | grepQuiet flake
|
||||
|
||||
# Also, the order should not matter
|
||||
nix "$@" --experimental-features 'nix-command' | grepQuietInverse flake
|
||||
nix "$@" --experimental-features 'nix-command flakes' | grepQuiet flake
|
||||
}
|
||||
|
||||
# Simple case, the configuration effects the running command
|
||||
both_ways show-config
|
||||
|
||||
# Complicated case, earlier args effect later args
|
||||
|
||||
both_ways store gc --help
|
||||
|
||||
expect 1 nix --experimental-features 'nix-command' show-config --flake-registry 'https://no'
|
||||
nix --experimental-features 'nix-command flakes' show-config --flake-registry 'https://no'
|
|
@ -18,6 +18,7 @@ nix_tests = \
|
|||
gc.sh \
|
||||
remote-store.sh \
|
||||
lang.sh \
|
||||
experimental-features.sh \
|
||||
fetchMercurial.sh \
|
||||
gc-auto.sh \
|
||||
user-envs.sh \
|
||||
|
|
Loading…
Reference in a new issue