|
|
562801 |
From 21b7c2d4086262fcc5a0c46fc0e4679b5d9fcd6f Mon Sep 17 00:00:00 2001
|
|
|
562801 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
562801 |
Date: Fri, 4 Apr 2014 11:30:13 +0200
|
|
|
562801 |
Subject: [LIBREPORT PATCH 41/93] testsuite: check return value of setlocale()
|
|
|
562801 |
|
|
|
562801 |
If setlocale() fails to set the desired locale value, the test results
|
|
|
562801 |
look like a bug appeared in libreport.
|
|
|
562801 |
|
|
|
562801 |
Related to rhbz#1070892
|
|
|
562801 |
|
|
|
562801 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
562801 |
---
|
|
|
562801 |
tests/xml_definition.at | 6 +++---
|
|
|
562801 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
562801 |
|
|
|
562801 |
diff --git a/tests/xml_definition.at b/tests/xml_definition.at
|
|
|
562801 |
index d3032c9..29043f8 100644
|
|
|
562801 |
--- a/tests/xml_definition.at
|
|
|
562801 |
+++ b/tests/xml_definition.at
|
|
|
562801 |
@@ -18,7 +18,7 @@ int main(void)
|
|
|
562801 |
{
|
|
|
562801 |
g_verbose = 3;
|
|
|
562801 |
|
|
|
562801 |
- setlocale(LC_ALL, "zh_CN");
|
|
|
562801 |
+ assert(setlocale(LC_ALL, "zh_CN") != NULL || !"setlocale() failed");
|
|
|
562801 |
|
|
|
562801 |
{
|
|
|
562801 |
event_config_t *event_config = new_event_config("event_test_definition");
|
|
|
562801 |
@@ -55,7 +55,7 @@ int main(void)
|
|
|
562801 |
free_workflow(workflow);
|
|
|
562801 |
}
|
|
|
562801 |
|
|
|
562801 |
- setlocale(LC_ALL, "zh_CN.utf8");
|
|
|
562801 |
+ assert(setlocale(LC_ALL, "zh_CN.utf8") != NULL || !"setlocale() failed");
|
|
|
562801 |
|
|
|
562801 |
{
|
|
|
562801 |
event_config_t *event_config = new_event_config("event_test_definition");
|
|
|
562801 |
@@ -97,7 +97,7 @@ int main(void)
|
|
|
562801 |
for zh_CN and followed by zh_TW. libreport should you string for zh_TW
|
|
|
562801 |
and these strings are prefixed with "bad " string.
|
|
|
562801 |
*/
|
|
|
562801 |
- setlocale(LC_ALL, "zh_HK");
|
|
|
562801 |
+ assert(setlocale(LC_ALL, "zh_HK") != NULL || !"setlocale() failed");
|
|
|
562801 |
|
|
|
562801 |
{
|
|
|
562801 |
event_config_t *event_config = new_event_config("event_test_definition");
|
|
|
562801 |
--
|
|
|
562801 |
1.8.3.1
|
|
|
562801 |
|