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