1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix: tests/functional/readfile-context.sh

This commit is contained in:
Farid Zakaria 2025-09-30 19:58:11 -07:00
parent c8a7719614
commit 8a36cf4422
2 changed files with 3 additions and 4 deletions

View file

@ -106,7 +106,6 @@
enable = true;
excludes = [
# We haven't linted these files yet
''^tests/functional/readfile-context\.sh$''
''^tests/functional/recursive\.sh$''
''^tests/functional/referrers\.sh$''
''^tests/functional/remote-store\.sh$''

View file

@ -9,12 +9,12 @@ clearStore
outPath=$(nix-build --no-out-link readfile-context.nix)
# Set a GC root.
ln -s $outPath "$NIX_STATE_DIR/gcroots/foo"
ln -s "$outPath" "$NIX_STATE_DIR/gcroots/foo"
# Check that file exists.
[ "$(cat $(cat $outPath))" = "Hello World!" ]
[ "$(cat "$(cat "$outPath")")" = "Hello World!" ]
nix-collect-garbage
# Check that file still exists.
[ "$(cat $(cat $outPath))" = "Hello World!" ]
[ "$(cat "$(cat "$outPath")")" = "Hello World!" ]