Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests/base/NSCalendar/era.m: Fix testing with non-English locale #357

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

Strahinja
Copy link
Contributor

@Strahinja Strahinja commented Dec 3, 2023

Currently, the NSCalendar tests fail (at least on musl-based Alpine Linux v3.18) in the file Tests/NSCalendar/era.m if the locale is set to any non-English locale. For example, with

$ export LANG=sr_RS.UTF-8

the ICU function udat_parse used by NSDateFormatter returns 9 (U_PARSE_ERROR) when passed the string containing English language month name (@"22 Nov 1969 08:15:00 Z"), which makes the tests fail.

This patch explicitly sets the NSDateFormatter locale in Tests/NSCalendar/era.m to en_US.

Solves part of the issues in #356.

Signed-off-by: Страхиња Радић <contact@strahinja.org>
Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks great, thanks.

@hmelder hmelder merged commit ecc5d80 into gnustep:master Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants