oz / tz

🌐 A time zone helper
GNU General Public License v3.0
849 stars 33 forks source link

Configuration file support (TOML) tests #69

Closed jnd-au closed 2 weeks ago

jnd-au commented 3 weeks ago

This PR adds unit-test coverage for the recently-added TOML config parsing, on top of the bugfixes in PR #67. It raises the overall unit test coverage from 46% to 73% (fix #68).

However:

  1. This PR does not test the correct semantic mapping of every individual key configuration, so there is still further improvement to be done in future. For example, it’s still possible for someone to add a new keystroke but forget to (or make a mistake when they) update some code paths or documentation (perhaps a new issue is deserved: “Configuration testing is incomplete”). In future, it may even be good to change the Keymap to a simple map[string][]string to reduce the amount of code paths and testing required.
  2. Furthermore, testing is needed for the configuration environment-variable support, but this is already included with bugfixes in PR #62 (work-in-progress, to be resumed after this PR has been merged).

This PR is based on #67 which should be merged first.