From d17cf5f3a32f07bf8a6b8fb014abfa8e87fd7075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kiedrowicz?= Date: Sat, 4 Aug 2012 00:21:04 +0200 Subject: tests: Introduce test_seq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jeff King wrote: The seq command is GNU-ism, and is missing at least in older BSD releases and their derivatives, not to mention antique commercial Unixes. We already purged it in b3431bc (Don't use seq in tests, not everyone has it, 2007-05-02), but a few new instances have crept in. They went unnoticed because they are in scripts that are not run by default. Replace them with test_seq that is implemented with a Perl snippet (proposed by Jeff). This is better than inlining this snippet everywhere it's needed because it's easier to read and it's easier to change the implementation (e.g. to C) if we ever decide to remove Perl from the test suite. Note that test_seq is not a complete replacement for seq(1). It just has what we need now, in addition that it makes it possible for us to do something like "test_seq a m" if we wanted to in the future. There are also many places that do `for i in 1 2 3 ...` but I'm not sure if it's worth converting them to test_seq. That would introduce running more processes of Perl. Signed-off-by: MichaƂ Kiedrowicz Acked-by: Jeff King Signed-off-by: Junio C Hamano --- t/t5551-http-fetch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t5551-http-fetch.sh') diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh index fadf2f258e..91eaf53d1d 100755 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@ -114,7 +114,7 @@ test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE test_expect_success EXPENSIVE 'create 50,000 tags in the repo' ' ( cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && - for i in `seq 50000` + for i in `test_seq 50000` do echo "commit refs/heads/too-many-refs" echo "mark :$i" -- cgit v1.2.3