How to crash swift core libs foundation tests ? By Setting a locale before executing test suite

Dear Core Devs,

There is a vicious bug in Darwin’s Objc implementation of JSON number encoding that irritates the president Macron :) this fact is well established. (check SR-6631 <https://bugs.swift.org/browse/SR-6631> for details)
But there is more, i've found an interesting variante that demonstrates that an equivalent issue exists in the Swift Core Foundations.

How to reproduce some correlated issues in swift-corelibs-foundation ?

1- write `setlocale(LC_ALL,"fr_FR »)` in `swift-corelibs-foundation/TestFoundation/main.swift`
2- Run the tests. => The unit tests will crash. https://clients.pereira-da-silva.com/apple/core-lib-test-crash.png

Setting a locale globally before running tests is not a normal procedure, but i do maintain that all critical test suites should be tested against a bunch of Locales to determinate possible localization impact.
I think that running at least all the tests suites once with various locales would enable to determinate if there are other blind spots.
When those spot will be clearly located we could apply a systematic multi local testing procedure to specific code areas to reduce the tests loads.

Best regards,

PS: @chris, you are in copy of this mail because i would appreciate to have your opinion on a what general testing strategy we could apply to prevent internationalization blind spot issues.

Benoit Pereira da Silva
Ultra Mobile Developer & Movement Activist
Développeur Ultra Mobile & Militant du mouvement

✄ --------------------------------
This e-mail is confidential. Distribution, copy, publication or use of this information for any purpose is prohibited without agreement of the sender.
Ce message est confidentiel. Toute distribution, copie, publication ou usage des informations contenues dans ce message sont interdits sans agrément préalable de l'expéditeur.