aboutsummaryrefslogtreecommitdiff
path: root/tests/nar.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-13 11:38:00 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-13 14:59:46 +0100
commit8390869811f56f5b2ff947efb9d48bcf219a0444 (patch)
treec657d6db8f82a12ecef164da738a48d033204f37 /tests/nar.scm
parent3ed56ad09b1d2be15e98d195b56886ec14899518 (diff)
downloadguix-8390869811f56f5b2ff947efb9d48bcf219a0444.tar
guix-8390869811f56f5b2ff947efb9d48bcf219a0444.tar.gz
tests: Check file canonicalization for 'restore-file-set'.
* guix/tests.scm (canonical-file?): New procedure. * tests/nar.scm ("restore-file-set (signed, valid)"): Check that every item of FILES matches 'canonical-file?'.
Diffstat (limited to 'tests/nar.scm')
-rw-r--r--tests/nar.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/nar.scm b/tests/nar.scm
index ff16c3c400..bf1b066687 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -25,6 +25,8 @@
#:select (open-sha256-port open-sha256-input-port))
#:use-module ((guix packages)
#:select (base32))
+ #:use-module ((guix build utils)
+ #:select (find-files))
#:use-module (rnrs bytevectors)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
@@ -354,7 +356,8 @@
(map (lambda (file)
(call-with-input-file file
get-string-all))
- files))))))))
+ files))
+ (every canonical-file? files)))))))
(test-assert "restore-file-set (missing signature)"
(let/ec return