jobcore/ding-libs/ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28.patch
2022-03-20 14:19:37 +02:00

36 lines
1.6 KiB
Diff

diff -rauN ding-libs-0.6.1/ini/ini_validators_ut_check.c ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28-patch/ini/ini_validators_ut_check.c
--- ding-libs-0.6.1/ini/ini_validators_ut_check.c 2017-09-07 17:24:13.000000000 +0200
+++ ding-libs-0.6.1-ini_validators_ut_check-glibc-2.28-patch/ini/ini_validators_ut_check.c 2018-09-17 13:13:29.989999949 +0200
@@ -602,11 +602,31 @@
fail_unless(ret == 0, "Got msg: [%s]", errmsg);
ini_errobj_next(errobj);
+ /* Different versions of libc produce slightly different error strings
+ * in this case. For simplicity compare against all of them. */
errmsg = ini_errobj_get_msg(errobj);
ret = strcmp(errmsg,
"[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'. "
+ "[rule/options_for_foo]: Cannot compile regular "
+ "expression from option 'section_re'. "
+ "Error: 'brackets ([ ]) not balanced'");
+ }
+ if (ret != 0) {
+ ret = strcmp(errmsg,
+ "[rule/options_for_foo]: Cannot compile regular "
+ "expression from option 'section_re'. "
+ "Error: 'Unmatched [, [^, [:, [., or [='");
+ }
+ fail_unless(ret == 0, "Got msg: [%s]", errmsg);
+ ini_errobj_next(errobj);
+
+
fail_unless(ret == 0, "Got msg: [%s]", errmsg);
ini_errobj_next(errobj);