aboutsummaryrefslogtreecommitdiff
path: root/tests/utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.scm')
-rw-r--r--tests/utils.scm21
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/utils.scm b/tests/utils.scm
index c2fb274193..e8549204d0 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -102,17 +102,16 @@
list))
(test-assert "filtered-port, file"
- (let ((file (search-path %load-path "guix.scm")))
- (call-with-input-file file
- (lambda (input)
- (let*-values (((compressed pids1)
- (filtered-port `(,%gzip "-c" "--fast") input))
- ((decompressed pids2)
- (filtered-port `(,%gzip "-d") compressed)))
- (and (every (compose zero? cdr waitpid)
- (append pids1 pids2))
- (equal? (get-bytevector-all decompressed)
- (call-with-input-file file get-bytevector-all))))))))
+ (let* ((file (search-path %load-path "guix.scm"))
+ (input (open-file file "r0")))
+ (let*-values (((compressed pids1)
+ (filtered-port `(,%gzip "-c" "--fast") input))
+ ((decompressed pids2)
+ (filtered-port `(,%gzip "-d") compressed)))
+ (and (every (compose zero? cdr waitpid)
+ (append pids1 pids2))
+ (equal? (get-bytevector-all decompressed)
+ (call-with-input-file file get-bytevector-all))))))
(test-assert "filtered-port, non-file"
(let ((data (call-with-input-file (search-path %load-path "guix.scm")