]> Kevux Git Server - rit/commit
t1300: write test expectations in the test's body
authorPatrick Steinhardt <ps@pks.im>
Mon, 22 Sep 2025 13:06:18 +0000 (15:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Sep 2025 16:32:57 +0000 (09:32 -0700)
commitf1371a3c9511361d3aedf37f833981113a3b19d8
tree6c989cc5e0ec7dc02ac2c953edb3e581e65df433
parentf368df439b31b422169975cc3c95f7db6a46eada
t1300: write test expectations in the test's body

There are a bunch of tests in t1300 where we write the test expectation
handed over to `test_cmp ()` outside of the test body. This does not
match our modern test style, and there isn't really a reason why this
would need to happen outside of the test bodies.

Convert those to instead do so as part of the test itself. While at it,
normalize these tests to use `<<\EOF` for those that don't use variable
expansion and `<<-EOF` for those that aren't sensitive to indentation.

Note that there are two exceptions that we leave as-is for now since
they are reused across tests.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1300-config.sh