[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/11: tests: Test 'add-to-store' with several hash algorithms.
From: |
guix-commits |
Subject: |
03/11: tests: Test 'add-to-store' with several hash algorithms. |
Date: |
Thu, 21 May 2020 19:39:18 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 73b27eaa64d90051870242464543153b8bcb95de
Author: Ludovic Courtès <address@hidden>
AuthorDate: Mon May 18 21:57:49 2020 +0200
tests: Test 'add-to-store' with several hash algorithms.
* tests/store.scm ("add-to-store"): New test.
---
tests/store.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/store.scm b/tests/store.scm
index 0af099c..f007846 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -115,6 +115,18 @@
(passwd:name (getpwuid (getuid)))))))
(list (stat:uid s) (stat:perms s))))
+(test-equal "add-to-store"
+ '("sha1" "sha256" "sha512")
+ (let* ((file (search-path %load-path "guix.scm"))
+ (content (call-with-input-file file get-bytevector-all)))
+ (map (lambda (hash-algo)
+ (let ((file (add-to-store %store "guix.scm" #f hash-algo file)))
+ (and (direct-store-path? file)
+ (bytevector=? (call-with-input-file file get-bytevector-all)
+ content)
+ hash-algo)))
+ '("sha1" "sha256" "sha512"))))
+
(test-equal "add-data-to-store"
#vu8(1 2 3 4 5)
(call-with-input-file (add-data-to-store %store "data" #vu8(1 2 3 4 5))
- branch master updated (1ce1583 -> ef1d475), guix-commits, 2020/05/21
- 01/11: doc: Use "Alternatively" instead of "Alternately"., guix-commits, 2020/05/21
- 05/11: guix hash, guix download: Add '--hash'., guix-commits, 2020/05/21
- 06/11: guix hash, guix download: Support base64 format., guix-commits, 2020/05/21
- 07/11: packages: Add 'base64' macro., guix-commits, 2020/05/21
- 08/11: packages: Introduce <content-hash> and use it in <origin>., guix-commits, 2020/05/21
- 09/11: lint: archival: Use 'origin-hash'., guix-commits, 2020/05/21
- 02/11: maint: Add "make check-channel-news"., guix-commits, 2020/05/21
- 03/11: tests: Test 'add-to-store' with several hash algorithms.,
guix-commits <=
- 10/11: upstream: Use 'origin-hash'., guix-commits, 2020/05/21
- 04/11: tests: Test fixed-output derivations with several hash algorithms., guix-commits, 2020/05/21
- 11/11: gnu: llvm: Remove unused 'package-elisp-from-package' procedure., guix-commits, 2020/05/21