summaryrefslogtreecommitdiff
path: root/tests/lzlib.scm
diff options
context:
space:
mode:
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)