t: directly test parse_pathspec_file()
authorAlexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Tue, 31 Dec 2019 10:15:12 +0000 (10:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 20:14:20 +0000 (12:14 -0800)
commitd0d0a357a18c5ce2e9586db28de753309e19f282
treee6fd3bd83be71f8ec32b3797092a8a5ad3b69022
parent568cabb2fed8e5e61057ac678a70a565dffd0763
t: directly test parse_pathspec_file()

Previously, `parse_pathspec_file()` was tested indirectly by invoking
git commands with properly crafted inputs. As demonstrated by the
previous bugfix, testing complicated black boxes indirectly can lead to
tests that silently test the wrong thing.

Introduce direct tests for `parse_pathspec_file()`.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-parse-pathspec-file.c [new file with mode: 0644]
t/helper/test-tool.c
t/helper/test-tool.h
t/t0067-parse_pathspec_file.sh [new file with mode: 0755]