diff --git a/internal/protocol/gopher/gopher_test.go b/internal/protocol/gopher/gopher_test.go index 92d4dae..3167333 100644 --- a/internal/protocol/gopher/gopher_test.go +++ b/internal/protocol/gopher/gopher_test.go @@ -437,6 +437,12 @@ func TestGopherResumeStaleMetadata(t *testing.T) { if string(data) != "Fresh\n" { t.Errorf("content = %q, want %q", string(data), "Fresh\n") } + // The orphan sidecar from a different URL must be removed once the + // successful fresh download completes — otherwise stale metadata + // could be picked up by a future --resume run. + if output.FileExists(outPath + output.ResumeMetaFileSuffix) { + t.Error("expected orphan .goget.meta to be deleted after fresh download") + } } // TestGopherResumeIgnoredWhenWriterSet verifies that --resume is silently