[geary/wip/composer-folks] Ensure test drivers all have sane locales set



commit 788a06144f89d8b45d92cb845a9cf44b91882ae8
Author: Michael Gratton <mike vee net>
Date:   Sat Jun 22 14:08:03 2019 +1000

    Ensure test drivers all have sane locales set

 test/test-client.vala      | 4 ++++
 test/test-engine.vala      | 4 ++++
 test/test-integration.vala | 4 ++++
 3 files changed, 12 insertions(+)
---
diff --git a/test/test-client.vala b/test/test-client.vala
index 8aaa3ff5..dccb36b9 100644
--- a/test/test-client.vala
+++ b/test/test-client.vala
@@ -26,6 +26,10 @@ int main(string[] args) {
      * Initialise all the things.
      */
 
+    // Ensure things like e.g. GLib's formatting routines uses a
+    // UTF-8-based locale rather ASCII
+    GLib.Intl.setlocale(LocaleCategory.ALL, "C.UTF-8");
+
     Gtk.init(ref args);
     Test.init(ref args);
 
diff --git a/test/test-engine.vala b/test/test-engine.vala
index 95068156..55862bd5 100644
--- a/test/test-engine.vala
+++ b/test/test-engine.vala
@@ -12,6 +12,10 @@ int main(string[] args) {
 
     Test.init(ref args);
 
+    // Ensure things like e.g. GLib's formatting routines uses a
+    // UTF-8-based locale rather ASCII
+    GLib.Intl.setlocale(LocaleCategory.ALL, "C.UTF-8");
+
     Geary.RFC822.init();
     Geary.HTML.init();
     Geary.Logging.init();
diff --git a/test/test-integration.vala b/test/test-integration.vala
index 02f58ccb..76a775bb 100644
--- a/test/test-integration.vala
+++ b/test/test-integration.vala
@@ -26,6 +26,10 @@ int main(string[] args) {
      * Initialise all the things.
      */
 
+    // Ensure things like e.g. GLib's formatting routines uses a
+    // UTF-8-based locale rather ASCII
+    GLib.Intl.setlocale(LocaleCategory.ALL, "C.UTF-8");
+
     Test.init(ref args);
 
     Geary.RFC822.init();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]