mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
shellcheck fix: tests/functional/export.sh
This commit is contained in:
parent
9e3c502521
commit
230da1cbe7
2 changed files with 9 additions and 8 deletions
|
|
@ -107,7 +107,6 @@
|
|||
excludes = [
|
||||
# We haven't linted these files yet
|
||||
''^tests/functional/dump-db\.sh$''
|
||||
''^tests/functional/export\.sh$''
|
||||
''^tests/functional/fetchClosure\.sh$''
|
||||
''^tests/functional/fetchGit\.sh$''
|
||||
''^tests/functional/fetchGitRefs\.sh$''
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@ clearStore
|
|||
|
||||
outPath=$(nix-build dependencies.nix --no-out-link)
|
||||
|
||||
nix-store --export $outPath > $TEST_ROOT/exp
|
||||
nix-store --export "$outPath" > "$TEST_ROOT"/exp
|
||||
|
||||
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all
|
||||
# shellcheck disable=SC2046
|
||||
nix-store --export $(nix-store -qR "$outPath") > "$TEST_ROOT"/exp_all
|
||||
|
||||
if nix-store --export $outPath >/dev/full ; then
|
||||
if nix-store --export "$outPath" >/dev/full ; then
|
||||
echo "exporting to a bad file descriptor should fail"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -20,7 +21,7 @@ fi
|
|||
|
||||
clearStore
|
||||
|
||||
if nix-store --import < $TEST_ROOT/exp; then
|
||||
if nix-store --import < "$TEST_ROOT"/exp; then
|
||||
echo "importing a non-closure should fail"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -28,13 +29,14 @@ fi
|
|||
|
||||
clearStore
|
||||
|
||||
nix-store --import < $TEST_ROOT/exp_all
|
||||
nix-store --import < "$TEST_ROOT"/exp_all
|
||||
|
||||
nix-store --export $(nix-store -qR $outPath) > $TEST_ROOT/exp_all2
|
||||
# shellcheck disable=SC2046
|
||||
nix-store --export $(nix-store -qR "$outPath") > "$TEST_ROOT"/exp_all2
|
||||
|
||||
|
||||
clearStore
|
||||
|
||||
# Regression test: the derivers in exp_all2 are empty, which shouldn't
|
||||
# cause a failure.
|
||||
nix-store --import < $TEST_ROOT/exp_all2
|
||||
nix-store --import < "$TEST_ROOT"/exp_all2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue