summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-11-20 15:36:32 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-10-09 09:32:27 +0800
commitaad052d6808fbd79d139f94fc88dc3e6f0947910 (patch)
treef759263a240d0e42ac9f78a6f3c7cba533618988 /tests
parente646e945d1420c38622376393039cb3cd2ac4d1f (diff)
downloadlibpeas-aad052d6808fbd79d139f94fc88dc3e6f0947910.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/libpeas-gtk/plugin-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/libpeas-gtk/plugin-manager.c b/tests/libpeas-gtk/plugin-manager.c
index 614ccea..f2e9147 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, \