mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
housekeeping: shellcheck test/functional/add.sh
This commit is contained in:
parent
8e9fc2853c
commit
6a507f5d3b
@ -507,7 +507,6 @@
|
||||
''^scripts/install-nix-from-closure\.sh$''
|
||||
''^scripts/install-systemd-multi-user\.sh$''
|
||||
''^src/nix/get-env\.sh$''
|
||||
''^tests/functional/add\.sh$''
|
||||
''^tests/functional/bash-profile\.sh$''
|
||||
''^tests/functional/binary-cache-build-remote\.sh$''
|
||||
''^tests/functional/binary-cache\.sh$''
|
||||
|
@ -3,10 +3,10 @@
|
||||
source common.sh
|
||||
|
||||
path1=$(nix-store --add ./dummy)
|
||||
echo $path1
|
||||
echo "$path1"
|
||||
|
||||
path2=$(nix-store --add-fixed sha256 --recursive ./dummy)
|
||||
echo $path2
|
||||
echo "$path2"
|
||||
|
||||
if test "$path1" != "$path2"; then
|
||||
echo "nix-store --add and --add-fixed mismatch"
|
||||
@ -14,18 +14,18 @@ if test "$path1" != "$path2"; then
|
||||
fi
|
||||
|
||||
path3=$(nix-store --add-fixed sha256 ./dummy)
|
||||
echo $path3
|
||||
echo "$path3"
|
||||
test "$path1" != "$path3" || exit 1
|
||||
|
||||
path4=$(nix-store --add-fixed sha1 --recursive ./dummy)
|
||||
echo $path4
|
||||
echo "$path4"
|
||||
test "$path1" != "$path4" || exit 1
|
||||
|
||||
hash1=$(nix-store -q --hash $path1)
|
||||
echo $hash1
|
||||
hash1=$(nix-store -q --hash "$path1")
|
||||
echo "$hash1"
|
||||
|
||||
hash2=$(nix-hash --type sha256 --base32 ./dummy)
|
||||
echo $hash2
|
||||
echo "$hash2"
|
||||
|
||||
test "$hash1" = "sha256:$hash2"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user