Skip to contentSkip to conversation

t5000: modernise archive and :(glob) test

PATCH In review Kostya Farber 2 participants 2 messages Feb 4, 2023 – Feb 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t5000: modernise archive and :(glob) test

To match present day coding guiding codelines let's:

- use <<-EOF, so we can indent all lines to the
the same level for this test

- use <<\EOF to notify the reader that no interpolation is exepected in the body

---
 t/t5000-tar-tree.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
t/t5000-tar-tree.sh +5 -5
index d473048138..eb3214bc17 100755
@@ -402,11 +402,11 @@ test_expect_success GZIP 'extract tgz file (external gzip)' '
 
 test_expect_success 'archive and :(glob)' '
 	git archive -v HEAD -- ":(glob)**/sh" >/dev/null 2>actual &&
-	cat >expect <<EOF &&
-a/
-a/bin/
-a/bin/sh
-EOF
+	cat >expect <<-\EOF &&
+	a/
+	a/bin/
+	a/bin/sh
+	EOF
 	test_cmp expect actual
 '
 
Signature · 1 line
2.39.0
#1 lore raw
Quoted 1 line · Kostya Farber

To match present day coding guiding codelines let's:

We can probably just say "coding guidelines" rather than "coding guiding codelines".

Quoted 5 lines

- use <<-EOF, so we can indent all lines to the
the same level for this test

- use <<\EOF to notify the reader that no interpolation is exepected in the body

s/exepected/expected/

Quoted 2 lines

---

For other reviewers who may not have been following along, this is a suggested replacement[1] to a rejected (by me[2]) GSoC microproject[3].

Quoted 6 lines
t/t5000-tar-tree.sh +0 -2
@@ -402,11 +402,11 @@ test_expect_success GZIP 'extract tgz file (external gzip)' '
 test_expect_success 'archive and :(glob)' '
        git archive -v HEAD -- ":(glob)**/sh" >/dev/null 2>actual &&
-       cat >expect <<EOF &&
-a/

t/t5000-tar-tree.sh test_expect_success GZIP 'extract tgz file (external gzip)' ' · line 410

Quoted 10 lines
t/t5000-tar-tree.sh +5 -3
-a/bin/
-a/bin/sh
-EOF
+       cat >expect <<-\EOF &&
+       a/
+       a/bin/
+       a/bin/sh
+       EOF
        test_cmp expect actual
 '

Thanks, these changes look fine.

[1]: https://lore.kernel.org/git/CAPig+cR+1bxgitSmJ47PxD=CPxJjMh5Vm+zRdVU8iEo9pvtutw@mail.gmail.com/
[2]: https://lore.kernel.org/git/CAPig+cTC4TUK2NXFmP6ymEYYjYAmCSd53dzFhKn0ido8x6uh1Q@mail.gmail.com/
[3]: https://lore.kernel.org/git/[email protected]/