aboutsummaryrefslogtreecommitdiff
path: root/tests/lzlib.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-03 17:03:56 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-03 17:03:56 +0200
commit30e12b9664d774aca3948b1fa2e0aee6af09ca40 (patch)
tree483e1bfaad4671b922bb070a35da3ada819f9e50 /tests/lzlib.scm
parent136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff)
parent3092f1b835d79655eecb2f8a79dda20ad9ba6bd6 (diff)
downloadguix-30e12b9664d774aca3948b1fa2e0aee6af09ca40.tar
guix-30e12b9664d774aca3948b1fa2e0aee6af09ca40.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'tests/lzlib.scm')
-rw-r--r--tests/lzlib.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lzlib.scm b/tests/lzlib.scm
index cf53a9417d..543622bb45 100644
--- a/tests/lzlib.scm
+++ b/tests/lzlib.scm
@@ -108,4 +108,14 @@
(test-assert* "Bytevector of size relative to Lzip internal buffers (1MiB+1)"
(compress-and-decompress (random-bytevector (1+ (* 1024 1024)))))
+(test-assert "make-lzip-input-port/compressed"
+ (let* ((len (pk 'len (+ 10 (random 4000 %seed))))
+ (data (random-bytevector len))
+ (compressed (make-lzip-input-port/compressed
+ (open-bytevector-input-port data)))
+ (result (call-with-lzip-input-port compressed
+ get-bytevector-all)))
+ (pk (bytevector-length result) (bytevector-length data))
+ (bytevector=? result data)))
+
(test-end)