[libcxx] [test] Remove a LIBCXX-WINDOWS-FIXME, don't test an unsupported strftime() pattern

Testing the unsupported pattern can trigger the invalid parameter handler,
which depending on CRT configuration can abort the process.

Differential Revision: https://reviews.llvm.org/D112352
This commit is contained in:
Martin Storsjö 2021-10-23 00:54:42 +03:00
parent ae31f9fbad
commit dd5ce506f7
1 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: LIBCXX-WINDOWS-FIXME
// <locale>
// class time_put<charT, OutputIterator>
@ -321,11 +319,15 @@ int main(int, char**)
std::string ex(str, iter.base());
// assert(ex == "-0400"); depends on time zone
}
#ifndef _WIN32
// The Windows strftime() doesn't support the "%+" format. Depending on CRT
// configuration of the invalid parameter handler, this can abort the process.
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, '+');
std::string ex(str, iter.base());
// assert(ex == "Sat May 2 13:03:06 EDT 2009"); depends on time zone
}
#endif
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, '%');
std::string ex(str, iter.base());