Skip to content

Skip the float locale test unless the decimal point is a comma - #122

Merged
GrahamCampbell merged 1 commit into
2.0from
tighten-float-locale-test-2.0
Nov 20, 2026
Merged

GrahamCampbell merged 1 commit into
2.0from
tighten-float-locale-test-2.0

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Member

testFloatExpansionIsLocaleIndependent switches to a comma-decimal locale and skips itself when none is available, but it took setlocale() not returning false as proof that it had one. With musl, setlocale() accepts any locale name and leaves the decimal point as ., so the test ran there and passed without ever seeing a comma decimal point. It now also checks that the decimal point really is a comma and skips otherwise. The check sits inside the try block, because a skip can now happen after the locale has been changed, and the previous locale must still be restored.

@GrahamCampbell
GrahamCampbell marked this pull request as ready for review November 20, 2026 14:02
@GrahamCampbell
GrahamCampbell merged commit a9c1d55 into 2.0 Nov 20, 2026
24 checks passed
@GrahamCampbell
GrahamCampbell deleted the tighten-float-locale-test-2.0 branch November 20, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant