diff options
| author | Glen Choo <chooglen@google.com> | 2022-03-07 16:14:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-03-07 16:51:02 -0800 |
| commit | f3117dfdd1a0e586066bb8963b43324f5dee9f90 (patch) | |
| tree | e876b1fc8352a0137f9255fc38ac47f9286d5de1 /git-gui/lib | |
| parent | dab1b7905d0b295f1acef9785bb2b9cbb0fdec84 (diff) | |
t5526: introduce test helper to assert on fetches
Tests in t/t5526-fetch-submodules.sh are unnecessarily noisy:
* The tests have extra logic in order to reproduce the expected stderr
literally, but not all of these details (e.g. the head of the
remote-tracking branch before the fetch) are relevant to the test.
* The expect.err file is constructed by the add_upstream_commit() helper
as input into test_cmp, but most tests fetch a different combination
of repos from expect.err. This results in noisy tests that modify
parts of that expect.err to generate the expected output.
To address both of these issues, introduce a verify_fetch_result()
helper to t/t5526-fetch-submodules.sh that asserts on the output of "git
fetch --recurse-submodules" and handles the ordering of expect.err.
As a result, the tests no longer construct expect.err manually. Tests
still consider the old head of the remote-tracking branch ("$head1"),
but that will be fixed in a later commit.
Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib')
0 files changed, 0 insertions, 0 deletions
