[gnome-control-center] [info] skip test-hostnames if en_US.UTF-8 is not available
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] [info] skip test-hostnames if en_US.UTF-8 is not available
- Date: Wed, 1 Jun 2011 16:01:51 +0000 (UTC)
commit 1e064c8b962d3ce8642e7fccafb06ab5a0a115ff
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Jun 1 17:57:33 2011 +0200
[info] skip test-hostnames if en_US.UTF-8 is not available
panels/info/test-hostname.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/info/test-hostname.c b/panels/info/test-hostname.c
index 3135e96..9a6e6e5 100644
--- a/panels/info/test-hostname.c
+++ b/panels/info/test-hostname.c
@@ -12,6 +12,7 @@ int main (int argc, char **argv)
guint i;
char *contents;
char **lines;
+ char *locale;
/* Running in some locales will
* break the tests as "ü" will be transliterated to
@@ -20,7 +21,11 @@ int main (int argc, char **argv)
* Work around that by forcing en_US with UTF-8 in
* our tests
* https://bugzilla.gnome.org/show_bug.cgi?id=650342 */
- setlocale (LC_ALL, "en_US.UTF-8");
+ locale = setlocale (LC_ALL, "en_US.UTF-8");
+ if (locale == NULL) {
+ g_debug("Missing en_US.UTF-8 locale, ignoring test.");
+ return 0;
+ }
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
if (g_file_get_contents (argv[1], &contents, NULL, NULL) == FALSE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]