Skip to content

Add API tests #5

@Ortham

Description

@Ortham

I'm not sure if it's worth adding unit tests for the implementation detail, but the API functions should be tested as fully as possible. This will involve having some BSAs to test against: my testing-plugins repository contains a Skyrim BSA that can be used to start with.

I've implemented a barebones set of tests in the add-tests branch. They're currently failing on Linux due to a zlib buffer error (I'm not sure why), but to improve test coverage I need:

  • A TES4 compressed BSA with at least one compressed and one uncompressed file in different folders
  • A TES4 uncompressed BSA with at least one compressed and one uncompressed file in different folders
  • The same combinations as above, but for TES5 BSAs
  • A TES3 BSA with at least two files

I need to then add tests for:

  • Operations on all the TES3, TES4 and TES5 BSAs: probably best to parameterise the existing tests
  • Extracting multiple files
  • Getting the CRC of a compressed file (already done, but should be renamed for clarity)
  • Getting the CRC of an uncompressed file
  • Extracting a compressed file to memory and the filesystem (already done, but should be renamed for clarity)
  • Extracting an uncompressed file to memory and the filesystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions