Skip to content

Improve test coverage and clean up dead code (#43)#46

Draft
MartinP7r wants to merge 3 commits intomainfrom
MartinP7r/43-test-coverage
Draft

Improve test coverage and clean up dead code (#43)#46
MartinP7r wants to merge 3 commits intomainfrom
MartinP7r/43-test-coverage

Conversation

@MartinP7r
Copy link
Copy Markdown
Owner

@MartinP7r MartinP7r commented Mar 28, 2026

Summary

Addresses #43 (Improve unit and integration test coverage) — Phases 1 and 2.

Phase 1: Unit tests + dead code removal

  • Add AcknowledgementsStringsTableTests.swift (5 tests): Codable round-trip, Settings.bundle coding keys, empty acknowledgements, sorting behavior, sorting consistency
  • Remove EnvironmentKey.swift — dead code since 2021, never referenced

Phase 2: Extract testable functions + integration tests

Bug fix

  • Fix Example/ackgen.sh: missing $ in SDKROOT command substitution

Test count: 31 → 42 (+11 new tests, 0 failures)

Closes #43 (Phases 1 & 2; Phase 3 UI tests remain low priority)

Test plan

  • All 42 tests pass
  • swift build succeeds after EnvironmentKey removal
  • Sorting consistency test confirms both strategies agree for ASCII names
  • Path derivation covers standard, archive, and edge-case paths

- Add 5 tests: Codable round-trip, Settings.bundle coding keys,
  empty acknowledgements, sorting behavior, and sorting consistency
  between lowercased() and localizedStandardCompare
- Remove EnvironmentKey.swift — unused since initial commit (2021),
  only SRCROOT and PROJECT_TEMP_DIR are needed and used as literals

Closes #43 Phase 1
- Extract path-parsing logic into testable deriveCheckoutsPath() function
- Add 6 DeriveCheckoutsPathTests: standard path, archive builds (#6),
  "Build" in username (#40), multiple Build segments, fallback
- Add 5 PlistEncodingTests: both output formats, multiline license
  preservation, file write round-trip
- Fix ackgen.sh: missing $ in SDKROOT command substitution

Closes #43 Phase 2
@MartinP7r MartinP7r changed the title Add StringsTable tests and remove dead EnvironmentKey Improve test coverage and clean up dead code (#43) Mar 28, 2026
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

Successfully merging this pull request may close these issues.

Improve unit and integration test coverage

1 participant