ding-libs/INI-Fix-detection-of-error-messages.patch
Jan Engelhardt 26dfb1f16c Accepting request 704658 from home:scarabeus_iv:branches:network:ldap
- Update to 0.6.1:
  * No upstream changelog
- Update URL
  * Remove the git link info as it 404 atm
- Add patches from upstream to fix ini behaviour:
  * INI-Fix-detection-of-error-messages.patch
  * INI-Silence-ini_augment-match-failures.patch
  * TEST-validators_ut_check-Fix-fail-with-new-glibc.patch

OBS-URL: https://build.opensuse.org/request/show/704658
OBS-URL: https://build.opensuse.org/package/show/network:ldap/ding-libs?expand=0&rev=35
2019-05-23 12:01:13 +00:00

48 lines
1.7 KiB
Diff

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