aboutsummaryrefslogtreecommitdiff
path: root/tests/fetchurl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fetchurl.sh')
-rw-r--r--tests/fetchurl.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/fetchurl.sh b/tests/fetchurl.sh
index 3d1685f43..b41d8c4b7 100644
--- a/tests/fetchurl.sh
+++ b/tests/fetchurl.sh
@@ -9,6 +9,10 @@ outPath=$(nix-build -vvvvv --expr 'import <nix/fetchurl.nix>' --argstr url file:
cmp $outPath fetchurl.sh
+# Do not re-fetch paths already present.
+outPath2=$(nix-build -vvvvv --expr 'import <nix/fetchurl.nix>' --argstr url file:///does-not-exist/must-remain-unused/fetchurl.sh --argstr sha256 $hash --no-out-link)
+test "$outPath" == "$outPath2"
+
# Now using a base-64 hash.
clearStore