]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0500-progress-display.sh
progress.c tests: make start/stop commands on stdin
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 3 Feb 2022 21:40:13 +0000 (22:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Feb 2022 23:39:55 +0000 (15:39 -0800)
commit791afae2924d032186bfad557c462c92025ac901
tree7afd4cea626cd18db6d24c38ce7ec3df7d9033d7
parent587c3d0da67aecc7c9defb576614962f8ca3faf8
progress.c tests: make start/stop commands on stdin

Change the usage of the "test-tool progress" introduced in
2bb74b53a49 (Test the progress display, 2019-09-16) to take command
like "start" and "stop" on stdin, instead of running them implicitly.

This makes for tests that are easier to read, since the recipe will
mirror the API usage, and allows for easily testing invalid usage that
would yield (or should yield) a BUG(), e.g. providing two "start"
calls in a row. A subsequent commit will add such tests.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-progress.c
t/t0500-progress-display.sh