Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases #7

Closed
19 tasks done
dgelessus opened this issue Dec 29, 2019 · 1 comment
Closed
19 tasks done

Test cases #7

dgelessus opened this issue Dec 29, 2019 · 1 comment

Comments

@dgelessus
Copy link
Owner

dgelessus commented Dec 29, 2019

The project currently has exactly zero automatic tests. This needs to change. In particular, the following features of the Python API should be tested:

  • Reading resource files
    • Basic structure (types, IDs, data)
    • Empty resource files (i. e. basic resource file structure is there, but the type list contains no entries)
    • Ordering of resource types and IDs should match that in the file (no automatic sorting or reordering)
    • Additional resource file metadata (header system/application data, resource file attributes)
    • Additional resource metadata (names, resource attributes)
  • Resource compression
    • Each of the supported compression algorithms
    • Compressed resource data header parsing
    • Integration with the main rsrcfork API
      • Automatic decompression (data vs. data_raw)
      • Exposing compressed resource metadata via compressed_info
  • Different ways of opening resource files
    • Directly from a stream
      • Seekable and non-seekable streams
    • By path from data fork
    • On Mac only: By path from resource fork
    • On Mac only: By path with automatic data/resource fork selection
      • Graceful handling of nonexistant, empty or invalid resource forks

Testing the command-line interface is not a priority for now, for multiple reasons:

  • It's not a proper API and not guaranteed to be stable
    • Some parts of the CLI are currently being reworked (or will be in the future)
  • It's based on the Python API, so most issues that would affect the CLI will be detected by the Python API tests
  • Testing terminal output is a pain and probably not worth the effort
@dgelessus dgelessus mentioned this issue Dec 29, 2019
Closed
@dgelessus
Copy link
Owner Author

Tests are now implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant