mime: remove test ordering dependency
commitf22c12d7361d22d47cce73d342edf2e1ebf20520
authorIan Lance Taylor <iant@golang.org>
Fri, 7 Apr 2023 20:27:04 +0000 (7 13:27 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 7 Apr 2023 21:07:10 +0000 (7 14:07 -0700)
treeebd8e7630e3d9ed37c26d2620b66925b61837ac3
parentf189c4ab489ce72e949c1ecde6b97e9dcbddf72e
mime: remove test ordering dependency

Backport CL 421442 from upstream.

Original description:

Arrange for tests that call setMimeInit to fully restore the old values,
by clearing the sync.Once that controls initialization.

Once we've done that, call initMime in initMimeUnixTest because
otherwise the test types loaded there will be cleared by the call to
initMime that previously was not being done.

For golang/go#51648

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/483117
gcc/go/gofrontend/MERGE
libgo/go/mime/type_test.go
libgo/go/mime/type_unix_test.go