[libpeas/meson.msvc: 15/19] test/libpeas-gtk/plugin-manager: Use en-US locale on Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas/meson.msvc: 15/19] test/libpeas-gtk/plugin-manager: Use en-US locale on Windows
- Date: Fri, 9 Oct 2020 01:56:23 +0000 (UTC)
commit aad052d6808fbd79d139f94fc88dc3e6f0947910
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Nov 20 15:36:32 2019 +0800
test/libpeas-gtk/plugin-manager: Use en-US locale on Windows
This will allow the tests here to pass on non-English versions of
Windows when translations of the GTK+ stack is present.
tests/libpeas-gtk/plugin-manager.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/tests/libpeas-gtk/plugin-manager.c b/tests/libpeas-gtk/plugin-manager.c
index 614cceab..f2e9147b 100644
--- a/tests/libpeas-gtk/plugin-manager.c
+++ b/tests/libpeas-gtk/plugin-manager.c
@@ -27,6 +27,11 @@
#include <libpeas/peas-i18n-priv.h>
#include <libpeas-gtk/peas-gtk.h>
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
#include "testing/testing.h"
typedef struct _TestFixture TestFixture;
@@ -381,6 +386,10 @@ main (int argc,
{
testing_init (&argc, &argv);
+#ifdef G_OS_WIN32
+ SetThreadLocale (MAKELCID (MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
+#endif
+
#define TEST(path, ftest) \
g_test_add ("/gtk/plugin-manager/" path, TestFixture, \
(gpointer) test_gtk_plugin_manager_##ftest, \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]