| 1 | package main |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | // The diverged-recovery marker is only useful if it survives the shared status |
| 6 | // whitelist. An earlier revision set a status string the whitelist dropped, so |
| 7 | // the project tree silently lost the prompt. |
| 8 | func TestNormalizeTopicStatusKeepsDivergedRecovery(t *testing.T) { |
| 9 | if got := normalizeTopicStatus(topicStatusDivergedRecovery); got != topicStatusDivergedRecovery { |
| 10 | t.Fatalf("normalizeTopicStatus(%q) = %q, want it preserved", topicStatusDivergedRecovery, got) |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | func TestNormalizeTopicStatusStillRejectsUnknown(t *testing.T) { |
| 15 | if got := normalizeTopicStatus("not_a_status"); got != "" { |
| 16 | t.Fatalf("normalizeTopicStatus(unknown) = %q, want empty", got) |
| 17 | } |
| 18 | } |
| 19 |