1
0
mirror of https://github.com/git/git.git synced 2024-10-19 18:48:25 +02:00
git/t/helper
Carlo Marcelo Arenas Belón aba8187e4d 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>
2020-05-18 13:03:35 -07:00
..
.gitignore
test-chmtime.c
test-config.c config: provide access to the current line number 2020-02-10 10:52:10 -08:00
test-ctype.c
test-date.c
test-delta.c
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c
test-dump-fsmonitor.c
test-dump-split-index.c
test-dump-untracked-cache.c
test-example-decorate.c
test-fake-ssh.c
test-genrandom.c
test-genzeros.c
test-hash-speed.c
test-hash.c
test-hashmap.c
test-index-version.c
test-json-writer.c
test-lazy-init-name-hash.c
test-line-buffer.c
test-match-trees.c
test-mergesort.c
test-mktemp.c
test-oidmap.c
test-online-cpus.c
test-parse-options.c parse-options: add testcases for OPT_CMDMODE() 2020-02-20 13:20:40 -08:00
test-parse-pathspec-file.c
test-path-utils.c
test-pkt-line.c
test-prio-queue.c
test-progress.c
test-reach.c
test-read-cache.c
test-read-graph.c
test-read-midx.c
test-ref-store.c
test-regex.c t/helper: teach test-regex to report pattern errors (like REG_ILLSEQ) 2020-05-18 13:03:35 -07:00
test-repository.c
test-revision-walking.c
test-run-command.c
test-scrap-cache-tree.c
test-serve-v2.c
test-sha1-array.c
test-sha1.c
test-sha1.sh
test-sha256.c
test-sigchain.c
test-strcmp-offset.c
test-string-list.c
test-submodule-config.c
test-submodule-nested-repo-config.c
test-subprocess.c
test-svn-fe.c
test-tool.c
test-tool.h
test-trace2.c
test-urlmatch-normalization.c
test-wildmatch.c
test-windows-named-pipe.c use strpbrk(3) to search for characters from a given set 2020-02-24 09:30:31 -08:00
test-write-cache.c
test-xml-encode.c