Blame SOURCES/INI-Fix-detection-of-error-messages.patch

76347b
From 72c19bd018b107ecf5a80963b433e9922f7243fd Mon Sep 17 00:00:00 2001
76347b
From: Lukas Slebodnik <lslebodn@redhat.com>
76347b
Date: Wed, 3 Jan 2018 18:03:44 +0100
76347b
Subject: [PATCH 01/11] INI: Fix detection of error messages
76347b
MIME-Version: 1.0
76347b
Content-Type: text/plain; charset=UTF-8
76347b
Content-Transfer-Encoding: 8bit
76347b
76347b
libc on BSD returns different error messages.
76347b
76347b
Reviewed-by: Michal Židek <mzidek@redhat.com>
76347b
---
76347b
 ini/ini_validators_ut_check.c | 11 +++++++++++
76347b
 1 file changed, 11 insertions(+)
76347b
76347b
diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c
76347b
index fa7105a..9ecde75 100644
76347b
--- a/ini/ini_validators_ut_check.c
76347b
+++ b/ini/ini_validators_ut_check.c
76347b
@@ -607,6 +607,12 @@ START_TEST(test_ini_allowed_options_wrong_regex)
76347b
                  "[rule/options_for_foo]: Cannot compile regular expression "
76347b
                  "from option 'section_re'. "
76347b
                  "Error: 'Unmatched [ or [^'");
76347b
+    if (ret != 0) {
76347b
+        ret = strcmp(errmsg,
76347b
+                     "[rule/options_for_foo]: Cannot compile regular expression "
76347b
+                     "from option 'section_re'. "
76347b
+                     "Error: 'brackets ([ ]) not balanced'");
76347b
+    }
76347b
     fail_unless(ret == 0, "Got msg: [%s]", errmsg);
76347b
     ini_errobj_next(errobj);
76347b
 
76347b
@@ -1028,6 +1034,11 @@ START_TEST(test_ini_allowed_sections_wrong_regex)
76347b
     ret = strcmp(errmsg,
76347b
                  "[rule/section_list]: Validator failed to use regex "
76347b
                  "[^foo\\(*$]:[Unmatched ( or \\(]");
76347b
+    if (ret !=0) {
76347b
+        ret = strcmp(errmsg,
76347b
+                     "[rule/section_list]: Validator failed to use regex "
76347b
+                     "[^foo\\(*$]:[parentheses not balanced]");
76347b
+    }
76347b
     fail_unless(ret == 0, "Got msg: [%s]", errmsg);
76347b
     ini_errobj_next(errobj);
76347b
 
76347b
-- 
76347b
2.9.5
76347b