test(version): add arm for empty vcs.revision guard #53
Labels
No labels
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
status/deferred
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/purser#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surveyor found this during PR#51 review (review 4983, approved).
The
s.Value != ""guard inString()has no dedicated test. Removing it makes all five existing arms still pass — because the arms that inject a non-emptyvcs.revisiondon't exercise the empty case, and the dev-fallback arm injects novcs.revisionat all.Missing arm: inject
vcs.revision = ""(key present, value empty) and verifyString()returns"dev", not"".Proof that this arm catches the mutation: removing
s.Value != ""makes the empty-value case return"", which fails this test.Surveyor provided the fix; carry-forward from PR#51 per "freeze on first approval" discipline.