diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-08-24 15:20:12 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-27 18:31:18 (GMT) |
commit | b2fa7a2372f42af404a942a4691a5341af8868e9 (patch) | |
tree | 5a7320926ea9d35dffce9a37d44ebbe981cfd4c3 /t/t5703-upload-pack-ref-in-want.sh | |
parent | 2a59a6ef2066c786b69253e148cccdc92cfdb434 (diff) | |
download | git-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/t5703-upload-pack-ref-in-want.sh')
-rwxr-xr-x | t/t5703-upload-pack-ref-in-want.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh index a73c55a..d1ccc22 100755 --- a/t/t5703-upload-pack-ref-in-want.sh +++ b/t/t5703-upload-pack-ref-in-want.sh @@ -176,7 +176,7 @@ test_expect_success 'setup repos for change-while-negotiating test' ' git clone "http://127.0.0.1:$LIB_HTTPD_PORT/smart/repo" "$LOCAL_PRISTINE" && cd "$LOCAL_PRISTINE" && git checkout -b side && - for i in $(seq 1 33); do test_commit s$i; done && + for i in $(test_seq 1 33); do test_commit s$i; done && # Add novel commits to upstream git checkout master && @@ -289,7 +289,7 @@ test_expect_success 'setup repos for fetching with ref-in-want tests' ' git clone "file://$REPO" "$LOCAL_PRISTINE" && cd "$LOCAL_PRISTINE" && git checkout -b side && - for i in $(seq 1 33); do test_commit s$i; done && + for i in $(test_seq 1 33); do test_commit s$i; done && # Add novel commits to upstream git checkout master && |