[geary/mjog/ci-updates: 1/2] Remove Flatpak test locale hack



commit 72bf62f8aa65ff1cfc1aa8340a428ca7f26a06a0
Author: Michael Gratton <mike vee net>
Date:   Mon Oct 7 19:22:22 2019 +1100

    Remove Flatpak test locale hack
    
    FDO 19.08 runtime now includes C.UTF-8 locale.

 test/engine/imap-db/imap-db-database-test.vala | 14 ++------------
 test/test-engine.vala                          |  8 --------
 2 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/test/engine/imap-db/imap-db-database-test.vala b/test/engine/imap-db/imap-db-database-test.vala
index 5b758c2a..9c738fae 100644
--- a/test/engine/imap-db/imap-db-database-test.vala
+++ b/test/engine/imap-db/imap-db-database-test.vala
@@ -143,23 +143,13 @@ class Geary.ImapDB.DatabaseTest : TestCase {
         db.exec("""
             CREATE TABLE Test (id INTEGER PRIMARY KEY, test_str TEXT);
             INSERT INTO Test (test_str) VALUES ('a');
+            INSERT INTO Test (test_str) VALUES ('b');
             INSERT INTO Test (test_str) VALUES ('B');
             INSERT INTO Test (test_str) VALUES ('BB');
             INSERT INTO Test (test_str) VALUES ('🤯');
         """);
 
-        string[] expected = { "a", "BB", "B", "🤯" };
-        // Distros don't ship well-known locales other than C.UTF-8 by
-        // default, but Flatpak does not currently ship C.UTF-8 at
-        // all, so need to support both. :(
-        //
-        // See test-engine.vala and
-        // https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/812
-        if (GLib.Intl.setlocale(LocaleCategory.COLLATE, null) != "C.UTF-8") {
-            // en_US.UTF-8:
-            expected = { "BB", "B", "a", "🤯" };
-        }
-
+        string[] expected = { "b", "a", "BB", "B", "🤯" };
         Db.Result result = db.query(
             "SELECT test_str FROM Test ORDER BY test_str COLLATE UTF8COLL DESC"
         );
diff --git a/test/test-engine.vala b/test/test-engine.vala
index 0f28510a..9d89f6f1 100644
--- a/test/test-engine.vala
+++ b/test/test-engine.vala
@@ -12,15 +12,7 @@ int main(string[] args) {
 
     // Ensure things like e.g. GLib's formatting routines uses a
     // well-known UTF-8-based locale rather ASCII.
-    //
-    // Distros don't ship well-known locales other than C.UTF-8 by
-    // default, but Flatpak does not currently support C.UTF-8, so
-    // need to try both. :(
-    // https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/812
     string? locale = GLib.Intl.setlocale(LocaleCategory.ALL, "C.UTF-8");
-    if (locale == null) {
-        GLib.Intl.setlocale(LocaleCategory.ALL, "en_US.UTF-8");
-    }
 
     Test.init(ref args);
 


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