[tracker] libtracker-data, tests: force en_US.utf8 collation locale



commit 52c5ff7c3b920ef795b1cc92fa0307cdf251e595
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Sep 2 13:03:29 2010 +0200

    libtracker-data, tests: force en_US.utf8 collation locale

 tests/libtracker-data/tracker-ontology-test.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-data/tracker-ontology-test.c b/tests/libtracker-data/tracker-ontology-test.c
index 6913e19..5ff4b7a 100644
--- a/tests/libtracker-data/tracker-ontology-test.c
+++ b/tests/libtracker-data/tracker-ontology-test.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include <string.h>
+#include <locale.h>
 
 #include <glib.h>
 #include <gio/gio.h>
@@ -240,7 +241,7 @@ test_query (gconstpointer test_data)
 	/* initialization */
 	tracker_data_manager_init (TRACKER_DB_MANAGER_FORCE_REINDEX,
 	                           NULL,
-	                           NULL, 
+	                           NULL,
 	                           FALSE,
 	                           NULL,
 	                           NULL,
@@ -285,6 +286,10 @@ main (int argc, char **argv)
 
 	data_dir = g_build_filename (g_get_current_dir (), "test-cache", NULL);
 
+	/* Warning warning!!! We need to impose a proper LC_COLLATE here, so
+	 * that the expected order in the test results is always the same! */
+	setlocale (LC_COLLATE, "en_US.utf8");
+
 	g_setenv ("XDG_DATA_HOME", data_dir, TRUE);
 	g_setenv ("XDG_CACHE_HOME", data_dir, TRUE);
 	g_setenv ("TRACKER_DB_SQL_DIR", TOP_SRCDIR "/data/db/", TRUE);



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