summaryrefslogtreecommitdiff
path: root/tests/nar.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-08 15:04:18 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-08 23:42:52 +0100
commit6f38960055e496193a49d690d7f1b5516b2b8625 (patch)
treef0ccd5ab8e87ef311f5a11a5fe4452e6f638bdfa /tests/nar.scm
parent19c1ac8d88b0925863623530ee65ac40861c2d8d (diff)
downloadpatches-6f38960055e496193a49d690d7f1b5516b2b8625.tar
patches-6f38960055e496193a49d690d7f1b5516b2b8625.tar.gz
hash: Close or flush sha256 output ports before calling their 'get' procedure.
Slightly different buffering of custom binary output ports in Guile 2.1.7 would lead tests missing 'close-port' or 'force-output' to fail. * tests/hash.scm ("open-sha256-port, hello"): Add call to 'force-output' before call to 'get'. * tests/nar.scm ("write-file puts file in C locale collation order"): Call 'close-port' before calling 'get-hash'.
Diffstat (limited to 'tests/nar.scm')
-rw-r--r--tests/nar.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/nar.scm b/tests/nar.scm
index 4f4b304b1d..28ead8b783 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -186,6 +186,7 @@
(lambda ()
(let-values (((port get-hash) (open-sha256-port)))
(write-file input port)
+ (close-port port)
(get-hash)))
(lambda ()
(rm-rf input)))))