[glib: 2/3] tests: Add missing setlocale() call to file tests
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] tests: Add missing setlocale() call to file tests
- Date: Mon, 7 Jun 2021 13:15:53 +0000 (UTC)
commit 4fd789c1603c73a53a73b0130ed7682111a6f113
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Jun 7 12:44:58 2021 +0100
tests: Add missing setlocale() call to file tests
This ensures that non-ASCII characters in the test output are printed
correctly in the logs.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
gio/tests/file.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index b2e1f3d46..2f1b7b310 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -1,3 +1,4 @@
+#include <locale.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -3008,6 +3009,8 @@ test_build_attribute_list_for_copy (void)
int
main (int argc, char *argv[])
{
+ setlocale (LC_ALL, "");
+
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/file/basic", test_basic);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]