diff options
| author | Zakariyah Ali <zakariyahali100@gmail.com> | 2026-03-28 00:40:19 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-28 11:26:13 -0700 |
| commit | d8e34f971b31ae6583e796626c7280732fca68e1 (patch) | |
| tree | 788071485d04bbbb33487fa689a7dc5fc4de33ae /refs/ref-cache.c | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
| download | git-d8e34f971b31ae6583e796626c7280732fca68e1.tar.xz | |
t2000: modernise overall structure
This test script that dates back to 2005 certainly shows its age and
both its style and the way the tests are laid out do not match the
modern standard.
* Executables that prepare the data used to test the command should
be inside the test_expect_success block in modern tests.
* In modern tests, running a command that is being tested, making
sure it succeeds, and inspecting other side effects that are
expected, are all done in a single test_expect_success block.
* A test_expect_success block in modern tests are laid out as
test_expect_success 'title of the test' '
body of the test &&
...
body of the test
'
not as
test_expect_success \
'title of the test' \
'body of the test &&
...
body of the test'
which is in a prehistoric style.
* In modern tests, each &&-chained statement in the body of the
test_expect_success block are indented with a horizontal tab,
unlike prehistoric style that used 4-space indent.
Signed-off-by: Zakariyah Ali <zakariyahali100@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/ref-cache.c')
0 files changed, 0 insertions, 0 deletions
