From 6f38960055e496193a49d690d7f1b5516b2b8625 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 15:04:18 +0100 Subject: 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'. --- tests/hash.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/hash.scm') diff --git a/tests/hash.scm b/tests/hash.scm index 8039549971..86501dca2d 100644 --- a/tests/hash.scm +++ b/tests/hash.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2013, 2014, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -67,6 +67,7 @@ (define (supports-unbuffered-cbip?) (let-values (((port get) (open-sha256-port))) (put-bytevector port (string->utf8 "hello world")) + (force-output port) (get))) (test-assert "port-sha256" -- cgit v1.2.3