Tests: test_index: Test lzma_index_buffer_encode() with empty output buf

This commit is contained in:
Lasse Collin 2024-04-27 15:01:25 +03:00
parent cd88423e76
commit 2c970debdb
1 changed files with 3 additions and 0 deletions

View File

@ -1628,6 +1628,9 @@ test_lzma_index_buffer_encode(void)
assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos,
0), LZMA_PROG_ERROR);
out_pos = 0;
assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos,
0), LZMA_BUF_ERROR);
assert_uint_eq(out_pos, 0);
assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos,
1), LZMA_BUF_ERROR);