From 6a507f5d3bc47244d99544f14a81b78fc84eb2be Mon Sep 17 00:00:00 2001 From: Cameron Dart <8763518+SkamDart@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:41:51 -0700 Subject: [PATCH] housekeeping: shellcheck test/functional/add.sh --- maintainers/flake-module.nix | 1 - tests/functional/add.sh | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index a42828208b0..3006d5e3080 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -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$'' diff --git a/tests/functional/add.sh b/tests/functional/add.sh index 9b448e33b4f..a6cf88e1a4c 100755 --- a/tests/functional/add.sh +++ b/tests/functional/add.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"