summaryrefslogtreecommitdiff
path: root/t/t5552-skipping-fetch-negotiator.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-08-24 15:20:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-27 18:31:18 (GMT)
commitb2fa7a2372f42af404a942a4691a5341af8868e9 (patch)
tree5a7320926ea9d35dffce9a37d44ebbe981cfd4c3 /t/t5552-skipping-fetch-negotiator.sh
parent2a59a6ef2066c786b69253e148cccdc92cfdb434 (diff)
downloadgit-b2fa7a2372f42af404a942a4691a5341af8868e9.zip
git-b2fa7a2372f42af404a942a4691a5341af8868e9.tar.gz
git-b2fa7a2372f42af404a942a4691a5341af8868e9.tar.bz2
tests: fix and add lint for non-portable seq
The seq command is not in POSIX, and doesn't exist on e.g. OpenBSD. We've had the test_seq wrapper since d17cf5f3a3 ("tests: Introduce test_seq", 2012-08-04), but use of it keeps coming back, e.g. in the recently added "fetch negotiator" tests being added here. So let's also add a check to "make test-lint". The regex is aiming to capture the likes of $(seq ..) and "seq" as a stand-alone command, without capturing some existing cases where we e.g. have files called "seq", as \bseq\b would do. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5552-skipping-fetch-negotiator.sh')
-rwxr-xr-xt/t5552-skipping-fetch-negotiator.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh
index 5ad5bec..30857b8 100755
--- a/t/t5552-skipping-fetch-negotiator.sh
+++ b/t/t5552-skipping-fetch-negotiator.sh
@@ -46,7 +46,7 @@ test_expect_success 'commits with no parents are sent regardless of skip distanc
test_commit -C server to_fetch &&
git init client &&
- for i in $(seq 7)
+ for i in $(test_seq 7)
do
test_commit -C client c$i
done &&
@@ -89,7 +89,7 @@ test_expect_success 'when two skips collide, favor the larger one' '
test_commit -C server to_fetch &&
git init client &&
- for i in $(seq 11)
+ for i in $(test_seq 11)
do
test_commit -C client c$i
done &&
@@ -168,14 +168,14 @@ test_expect_success 'do not send "have" with ancestors of commits that server AC
test_commit -C server to_fetch &&
git init client &&
- for i in $(seq 8)
+ for i in $(test_seq 8)
do
git -C client checkout --orphan b$i &&
test_commit -C client b$i.c0
done &&
- for j in $(seq 19)
+ for j in $(test_seq 19)
do
- for i in $(seq 8)
+ for i in $(test_seq 8)
do
git -C client checkout b$i &&
test_commit -C client b$i.c$j
@@ -205,7 +205,7 @@ test_expect_success 'do not send "have" with ancestors of commits that server AC
# fetch-pack should thus not send any more commits in the b1 branch, but
# should still send the others (in this test, just check b2).
- for i in $(seq 0 8)
+ for i in $(test_seq 0 8)
do
have_not_sent b1.c$i
done &&