Skip to content

Commit

Permalink
Adjust locales
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 4, 2025
1 parent 3acb883 commit eeb0756
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/docker/alpine-linux-3.18-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ ENV ARROW_ACERO=ON \
ARROW_WITH_ZSTD=ON \
AWSSDK_SOURCE=BUNDLED \
google_cloud_cpp_storage_SOURCE=BUNDLED \
PATH=/usr/lib/ccache/:$PATH
MUSL_LOCPATH=/usr/share/i18n/locales/musl \
PATH=/usr/lib/ccache/bin:$PATH
9 changes: 9 additions & 0 deletions cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2154,13 +2154,22 @@ TEST_F(ScalarTemporalTest, StrftimeOtherLocale) {
auto options = StrftimeOptions("%d %B %Y %H:%M:%S", "fr_FR.UTF-8");
const char* milliseconds = R"(
["1970-01-01T00:00:59.123", "2021-08-18T15:11:50.456", null])";
#ifdef ARROW_WITH_MUSL
// musl-locales uses Capital case for month name.
const char* expected = R"(
["01 Janvier 1970 00:00:59,123", "18 Août 2021 15:11:50,456", null])";
#else
const char* expected = R"(
["01 janvier 1970 00:00:59,123", "18 août 2021 15:11:50,456", null])";
#endif
CheckScalarUnary("strftime", timestamp(TimeUnit::MILLI, "UTC"), milliseconds, utf8(),
expected, &options);
}

TEST_F(ScalarTemporalTest, StrftimeInvalidLocale) {
#ifdef ARROW_WITH_MUSL
GTEST_SKIP() << "musl doesn't report an error for invalid locale";
#endif
#ifdef __EMSCRIPTEN__
GTEST_SKIP() << "Emscripten doesn't build with multiple locales as default";
#endif
Expand Down

0 comments on commit eeb0756

Please sign in to comment.