Update tests/functional/tarball.sh

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
Eelco Dolstra 2024-06-11 19:39:42 +02:00 committed by GitHub
parent 35bdb9cee7
commit bd37a70d8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,6 +61,9 @@ test_tarball .xz xz
test_tarball .gz gzip
# Test hard links.
# All entries in tree.tar.gz refer to the same file, and all have the same inode when unpacked by GNU tar.
# We don't preserve the hard links, because that's an optimization we think is not worth the complexity,
# so we only make sure that the contents are copied correctly.
path="$(nix flake prefetch --json "tarball+file://$(pwd)/tree.tar.gz" | jq -r .storePath)"
[[ $(cat "$path/a/b/foo") = bar ]]
[[ $(cat "$path/a/b/xyzzy") = bar ]]