test: test behavior of .-prefixed attrPaths

This commit is contained in:
Tom Bereknyei 2023-08-27 04:42:52 -04:00
parent c609be4072
commit 696eb79b15
2 changed files with 18 additions and 0 deletions

View 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 ]

View file

@ -12,6 +12,7 @@ nix_tests = \
flakes/check.sh \ flakes/check.sh \
flakes/unlocked-override.sh \ flakes/unlocked-override.sh \
flakes/absolute-paths.sh \ flakes/absolute-paths.sh \
flakes/absolute-attr-paths.sh \
flakes/build-paths.sh \ flakes/build-paths.sh \
flakes/flake-in-submodule.sh \ flakes/flake-in-submodule.sh \
gc.sh \ gc.sh \