aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-04-13 22:19:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2024-04-13 22:39:10 +0300
commitfcbd0d199933a69713cb293cbd7409a757d854cd (patch)
treee6e130692850fc5240f5bd3e0395b9ed20359927
parentTests: test_microlzma: Tweak comments, coding style, and minor details (diff)
downloadxz-larhzu/master.tar.xz
Tests: test_microlzma: Add a "FIXME?" about LZMA_FINISH handlingHEADlarhzu/master
-rw-r--r--tests/test_microlzma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_microlzma.c b/tests/test_microlzma.c
index 8da79a97..c1d99d77 100644
--- a/tests/test_microlzma.c
+++ b/tests/test_microlzma.c
@@ -411,7 +411,15 @@ test_decode_uncomp_size_wrong(void)
// No error detected, even though all input was consumed and there
// is more room in the output buffer.
+ //
+ // FIXME? LZMA_FINISH tells that no more input is coming and
+ // the MicroLZMA decoder knows the exact compressed size from
+ // the initialization as well. So should it return LZMA_DATA_ERROR
+ // on the first call instead of relying on the generic lzma_code()
+ // logic to eventually get LZMA_BUF_ERROR?
assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_OK);
+ assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_OK);
+ assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_BUF_ERROR);
assert_uint_eq(strm.total_out, sizeof(goodbye_world));
assert_array_eq(goodbye_world, output, sizeof(goodbye_world));