diff options
-rw-r--r-- | test/unit/testDocument.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/testDocument.cxx b/test/unit/testDocument.cxx index 4ed1dbbbd..570e54c4c 100644 --- a/test/unit/testDocument.cxx +++ b/test/unit/testDocument.cxx @@ -38,6 +38,18 @@ using namespace Scintilla; using namespace Scintilla::Internal; +#if !defined(_WIN32) && !defined(NO_CXX11_REGEX) +// set global locale to pass std::regex related tests +// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63776 +struct GlobalLocaleInitializer { + GlobalLocaleInitializer() { + try { + std::locale::global(std::locale("en_US.UTF-8")); + } catch (...) {} + } +} globalLocaleInitializer; +#endif + // Test Document. struct Folding { |