]> git.ipfire.org Git - thirdparty/git.git/commit
t4207: modernize test
authorDerrick Stolee <derrickstolee@github.com>
Fri, 5 Aug 2022 17:58:34 +0000 (17:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Aug 2022 21:13:11 +0000 (14:13 -0700)
commitb004521aa6f935fecd1426cab2997f7f8b31dcab
tree7732459112e4150a7d206171691919d5f0bafd79
parentb877e617e6e582553e21055deb272ce3a1354e1a
t4207: modernize test

Before adding new tests to t4207-log-decoration-colors.sh, update the
existing test to use modern test conventions. This includes:

1. Use lowercase in test names.

2. Keep all test setup inside the test_expect_success blocks. We need
   to be careful about left whitespace in the broken lines of the input
   file.

3. Do not use 'git' commands on the left side of a pipe.

4. Create a cmp_filtered_decorations helper to perform the 'log', 'sed',
   and test_decode_color manipulations. Move the '--all' option to be an
   argument so we can change that value in future tests.

5. Modify the 'sed' command to use a simpler form that is more
   portable.

The next change will introduce new tests usinge these new conventions.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4207-log-decoration-colors.sh