summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2018-10-24 15:44:00 +0100
committerDaniel Boles <dboles@src.gnome.org>2018-10-24 20:19:46 +0100
commit25846ce12a96c1bca51223b5c54f5e3d91063416 (patch)
tree9bf99c08a8f52e6c6a6158fcca766f9b3c118923 /tests
parent3b3d656c4eb176cca33069aa53b4f4a555e958de (diff)
downloadglibmm-25846ce12a96c1bca51223b5c54f5e3d91063416.tar.gz
tests/glibmm_ustring_format: Fix non-English langs
>>> when I tested it, the glibmm_ustring_format test failed. It failed because my chosen language in Ubuntu is Swedish. The expected "42.00" became "42,00". The decimal delimiter is a comma in most European languages. English is an exception. >>> https://gitlab.gnome.org/GNOME/glibmm/merge_requests/4#note_352960
Diffstat (limited to 'tests')
-rw-r--r--tests/glibmm_ustring_format/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/glibmm_ustring_format/main.cc b/tests/glibmm_ustring_format/main.cc
index 76a3efab..62a39ba6 100644
--- a/tests/glibmm_ustring_format/main.cc
+++ b/tests/glibmm_ustring_format/main.cc
@@ -6,6 +6,10 @@
int
main(int, char**)
{
+ // Don't use the user's preferred locale. The decimal delimiter may be ','
+ // instead of the expected '.'.
+ Glib::set_init_to_users_preferred_locale(false);
+
Glib::init();
char carr[10] = "UÅūduotys";