What happens
ContributionMilestoneTests → "share message and URLs include encoded milestone content" fails on
any machine whose locale groups thousands with . rather than ,:
Expectation failed: (message → "I've dictated 31.000 words with Muesli. …") == "I've dictated 31,000 words with Muesli. …"
Expectation failed: (tweetURL.absoluteString → "…31.000%20words…").contains("31,000")
The test asserts a US-grouped 31,000, but the value is formatted with the current locale, so on a
German, Swiss, Polish, Russian, Dutch (and so on) system it renders 31.000 and the two assertions
fail. CI runs on a US locale, so the suite is green there and only contributors see it.
Reproduce
defaults write -g AppleLocale -string "de_CH" # or run on a machine already set to such a locale
swift test --package-path native/MuesliNative --filter ContributionMilestone
Observed on main at c0a73d7, macOS 27, locale pl_PL with de_CH regional formats:
Test run with 11 tests in 1 suite failed with 2 issues.
Suggested fix
Either format the expectation with the same locale-aware formatter the production code uses, or pin
the formatter in the test to a fixed locale (Locale(identifier: "en_US_POSIX")) so the assertion
does not depend on the developer's region.
I noticed this while running the suite for #433 / #434 and confirmed it fails identically on
unmodified main, so it is not caused by those branches. Happy to send a patch if you have a
preference between the two approaches.
What happens
ContributionMilestoneTests→ "share message and URLs include encoded milestone content" fails onany machine whose locale groups thousands with
.rather than,:The test asserts a US-grouped
31,000, but the value is formatted with the current locale, so on aGerman, Swiss, Polish, Russian, Dutch (and so on) system it renders
31.000and the two assertionsfail. CI runs on a US locale, so the suite is green there and only contributors see it.
Reproduce
Observed on
mainat c0a73d7, macOS 27, localepl_PLwithde_CHregional formats:Test run with 11 tests in 1 suite failed with 2 issues.Suggested fix
Either format the expectation with the same locale-aware formatter the production code uses, or pin
the formatter in the test to a fixed locale (
Locale(identifier: "en_US_POSIX")) so the assertiondoes not depend on the developer's region.
I noticed this while running the suite for #433 / #434 and confirmed it fails identically on
unmodified
main, so it is not caused by those branches. Happy to send a patch if you have apreference between the two approaches.