|
Implement comprehensive unit tests for critical internal packages
to increase overall test coverage from 80.9% to 81.8%, providing
a buffer above the 80% threshold specified in project guidelines.
Changes:
- Add config parsing tests (parseTemperatureValue, decodeModelEntry, resolvedModel, parseSurfaceEntries)
- Add HumanBytes utility tests with edge cases and boundary values
- Fix HumanBytes bug: corrected suffix array indexing (off-by-one error)
- Fix HumanBytes to handle negative values correctly
- Add comprehensive shellJoin and isSafeBare tests for shell escaping
- Update comments to reflect actual behavior and implementation details
Coverage impact:
- internal/appconfig: Improved config parsing function coverage
- internal/textutil: HumanBytes now at 100% coverage (fixed bug in process)
- internal/tmux: shellJoin and isSafeBare now at 100% coverage
- Overall project: 80.9% → 81.8% (+0.9%)
All tests pass. Code formatted with gofumpt.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|