[rhythmbox/wip/hadess/fix-setlocale: 2/2] tests: Fix locale initialisation
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/fix-setlocale: 2/2] tests: Fix locale initialisation
- Date: Fri, 2 Apr 2021 13:44:30 +0000 (UTC)
commit d0e884f0ad02aaa21e45680b4f3131d6ba3296c7
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 2 15:44:10 2021 +0200
tests: Fix locale initialisation
Call setlocale() with "" as the locale to initialise locale support from
environment variables, rather than with NULL, which will return the
current locale setting in a retval we ignore.
tests/bench-rhythmdb-load.c | 2 +-
tests/test-file-helpers.c | 2 +-
tests/test-rhythmdb-property-model.c | 2 +-
tests/test-rhythmdb-query-model.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/bench-rhythmdb-load.c b/tests/bench-rhythmdb-load.c
index c65eae621..a43e83365 100644
--- a/tests/bench-rhythmdb-load.c
+++ b/tests/bench-rhythmdb-load.c
@@ -100,7 +100,7 @@ main (int argc, char **argv)
rb_profile_start ("load test");
rb_threads_init ();
- setlocale (LC_ALL, NULL);
+ setlocale (LC_ALL, "");
gtk_init (&argc, &argv);
rb_debug_init (FALSE);
rb_refstring_system_init ();
diff --git a/tests/test-file-helpers.c b/tests/test-file-helpers.c
index 855b15fc0..91de4e0c7 100644
--- a/tests/test-file-helpers.c
+++ b/tests/test-file-helpers.c
@@ -123,7 +123,7 @@ main (int argc, char **argv)
rb_profile_start ("rb-file-helpers test suite");
rb_threads_init ();
- setlocale (LC_ALL, NULL);
+ setlocale (LC_ALL, "");
rb_debug_init (TRUE);
rb_file_helpers_init (TRUE);
diff --git a/tests/test-rhythmdb-property-model.c b/tests/test-rhythmdb-property-model.c
index d7cdd2ab3..ea4b2b383 100644
--- a/tests/test-rhythmdb-property-model.c
+++ b/tests/test-rhythmdb-property-model.c
@@ -700,7 +700,7 @@ main (int argc, char **argv)
rb_profile_start ("rhythmdb-property-model test suite");
rb_threads_init ();
- setlocale (LC_ALL, NULL);
+ setlocale (LC_ALL, "");
rb_debug_init (TRUE);
rb_refstring_system_init ();
rb_file_helpers_init (TRUE);
diff --git a/tests/test-rhythmdb-query-model.c b/tests/test-rhythmdb-query-model.c
index da2615699..99d5eadbf 100644
--- a/tests/test-rhythmdb-query-model.c
+++ b/tests/test-rhythmdb-query-model.c
@@ -318,7 +318,7 @@ main (int argc, char **argv)
rb_profile_start ("rhythmdb-query-model test suite");
rb_threads_init ();
- setlocale (LC_ALL, NULL);
+ setlocale (LC_ALL, "");
rb_debug_init (TRUE);
rb_refstring_system_init ();
rb_file_helpers_init (TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]