ribzip2 icon indicating copy to clipboard operation
ribzip2 copied to clipboard

Write tests documenting the usage of the library

Open torfmaster opened this issue 4 years ago • 2 comments

The library usage is currently poorly documented. Moreover, the only existing tests testing compression / decompression end-to-end. Let's solve these problems at once!

  • write round-trip unit tests for libribzip2 doing compression/decompression/compression. You can for example use the contents of cli/samples/pepper.txt which tests some of the features. You can also produce some static data larger than the block size of 900k to also test that use case
  • write tests for decompression using original bzip2 compressed data. You can store a bz2 file in the source code using https://doc.rust-lang.org/std/macro.include_bytes.html
  • write doc simple tests for the public library functions to explain the usage. Also run the doc tests in CI

torfmaster avatar Jan 31 '22 08:01 torfmaster

Hello! I would like to take this on if it still needs doing.

spennydl avatar Mar 08 '22 23:03 spennydl

Go ahead. If you have questions, feel free to ask!

torfmaster avatar Mar 09 '22 07:03 torfmaster