summaryrefslogtreecommitdiff
path: root/Documentation/RelNotes/2.17.0.txt
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-02-08 16:56:56 +0100
committerJunio C Hamano <gitster@pobox.com>2018-02-08 10:54:27 -0800
commit63b1a175ee284f37c009e0afd7ee88a7c04ca515 (patch)
treeceb25ddc378a66f4c49841181098504a3f6275d9 /Documentation/RelNotes/2.17.0.txt
parentfd29d7b9d767296e0f8fbd3f7def735424fdbb30 (diff)
downloadgit-63b1a175ee284f37c009e0afd7ee88a7c04ca515.tar.gz
t: make 'test_i18ngrep' more informative on failuresg/test-i18ngrep
When 'test_i18ngrep' can't find the expected pattern, it exits completely silently; when its negated form does find the pattern that shouldn't be there, it prints the matching line(s) but otherwise exits without any error message. This leaves the developer puzzled about what could have gone wrong. Make 'test_i18ngrep' more informative on failure by printing an error message including the invoked 'grep' command and the contents of the file it had to scan through. Note that this "dump the scanned file" part is not quite perfect, as it dumps only the file specified as the function's last positional parameter, thus assuming that there is only a single file parameter. I think that's a reasonable assumption to make, one that holds true in the current code base. And even if someone were to scan multiple files at once in the future, the worst thing that could happen is that the verbose error message won't include the contents of all those files, only the last one. Alas, we can't really do any better than this, because checking whether the other positional parameters match a filename can result in false positives: 't3400-rebase.sh' and 't3404-rebase-interactive.sh' contain one test each, where the 'test_i18ngrep's pattern verbatimly matches a file in the trash directory. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/2.17.0.txt')
0 files changed, 0 insertions, 0 deletions