diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2020-05-18 11:44:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-18 13:03:35 -0700 |
commit | aba8187e4d6a1c517e327a1512589e540943e4c9 (patch) | |
tree | 0c87fd51e39f1b37bc4c085a9db6cf881ac8a08d /t/t4018/cpp-struct-definition | |
parent | Git 2.26.2 (diff) | |
download | tgif-aba8187e4d6a1c517e327a1512589e540943e4c9.tar.xz |
t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ)
7187c7bbb8 (t4210: skip i18n tests that don't work on FreeBSD, 2019-11-27)
adds a REG_ILLSEQ prerequisite to avoid failures from the tests added in
4e2443b181 (log tests: test regex backends in "--encode=<enc>" tests,
2019-06-28), but hardcodes it to be only enabled in FreeBSD.
Instead of hardcoding the affected platform, teach the test-regex helper,
how to validate a pattern and report back, so it can be used to detect the
same issue in other affected systems (like DragonFlyBSD or macOS).
While at it, refactor the tool so it can report back the source of the
errors it founds, and can be invoked also in a --silent mode, when needed,
for backward compatibility. A missing flag has been added and the code
reformatted, as well as updates to the way the parameters are handled, for
consistency.
To minimize changes, it is assumed the regcomp error is of the right type
since we control the only caller, and is also assumed to affect both basic
and extended syntax (only basic is tested, but both behave the same in all
three affected platforms since they use the same function).
Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/cpp-struct-definition')
0 files changed, 0 insertions, 0 deletions