Skip to content

Commit

Permalink
test: test behavior of .-prefixed attrPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
tomberek committed Aug 27, 2023
1 parent c609be4 commit 696eb79
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/flakes/absolute-attr-paths.sh
Original file line number Diff line number Diff line change
@@ -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 ]
1 change: 1 addition & 0 deletions tests/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 696eb79

Please sign in to comment.