[libcxx-commits] [libcxx] 810752a - [libcxx] [test] Fix the locale.time.put.byname/put1 testcase on Linux and Windows
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 26 12:14:31 PST 2022
Author: Martin Storsjö
Date: 2022-01-26T22:13:39+02:00
New Revision: 810752aaa1eb904654e543e96f76e004562304ae
URL: https://github.com/llvm/llvm-project/commit/810752aaa1eb904654e543e96f76e004562304ae
DIFF: https://github.com/llvm/llvm-project/commit/810752aaa1eb904654e543e96f76e004562304ae.diff
LOG: [libcxx] [test] Fix the locale.time.put.byname/put1 testcase on Linux and Windows
The Windows and Glibc abbreviated form of Saturday in French locale
is "sam." with a trailing period included. Account for this in the
test reference.
Differential Revision: https://reviews.llvm.org/D118240
Added:
Modified:
libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index db55a939f6ee..92b10ea9d0af 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -9,7 +9,6 @@
// NetBSD does not support LC_TIME at the moment
// XFAIL: netbsd
-// XFAIL: LIBCXX-WINDOWS-FIXME
// XFAIL: LIBCXX-AIX-FIXME
// REQUIRES: locale.en_US.UTF-8
@@ -29,9 +28,6 @@
// ~time_put_byname();
// };
-// TODO: investigation needed
-// XFAIL: target={{.*}}-linux-gnu{{.*}}
-
#include <locale>
#include <cassert>
#include "test_macros.h"
@@ -74,12 +70,13 @@ int main(int, char**)
}
{
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
- std::string pat("Today is %A which is abbreviated %a.");
+ std::string pat("Today is %A which is abbreviated '%a'.");
iter = f.put(output_iterator<char*>(str), ios, '*', &t,
pat.data(), pat.data() + pat.size());
std::string ex(str, iter.base());
- assert((ex == "Today is Samedi which is abbreviated Sam.")||
- (ex == "Today is samedi which is abbreviated sam." ));
+ assert((ex == "Today is Samedi which is abbreviated 'Sam'.")||
+ (ex == "Today is samedi which is abbreviated 'sam'." )||
+ (ex == "Today is samedi which is abbreviated 'sam.'."));
}
return 0;
More information about the libcxx-commits
mailing list