mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
test: test behavior of .-prefixed attrPaths
This commit is contained in:
parent
c609be4072
commit
696eb79b15
2 changed files with 18 additions and 0 deletions
17
tests/flakes/absolute-attr-paths.sh
Normal file
17
tests/flakes/absolute-attr-paths.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
source ./common.sh
|
||||
|
||||
flake1Dir=$TEST_ROOT/flake1
|
||||
|
||||
mkdir -p $flake1Dir
|
||||
cat > $flake1Dir/flake.nix <<EOF
|
||||
{
|
||||
outputs = { self }: {
|
||||
x = 1;
|
||||
packages.$system.x = 2;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
[ "$(nix eval --impure --json $flake1Dir#.x)" -eq 1 ]
|
||||
[ "$(nix eval --impure --json $flake1Dir#x)" -eq 2 ]
|
||||
[ "$(nix eval --impure --json $flake1Dir#.packages.$system.x)" -eq 2 ]
|
|
@ -12,6 +12,7 @@ nix_tests = \
|
|||
flakes/check.sh \
|
||||
flakes/unlocked-override.sh \
|
||||
flakes/absolute-paths.sh \
|
||||
flakes/absolute-attr-paths.sh \
|
||||
flakes/build-paths.sh \
|
||||
flakes/flake-in-submodule.sh \
|
||||
gc.sh \
|
||||
|
|
Loading…
Reference in a new issue