Skip to content

Commit c70bea2

Browse files
pks-tgitster
authored andcommitted
t5550: add ICONV prereq to tests that use "$HTTPD_URL/error"
We've got a bunch of tests in t5550 that connect to "$HTTPD_URL/error" to ensure that error messages are properly forwarded. This URL executes the "t/lib-httpd/error.sh" script, which in turn depends on the iconv(1) executable to reencode the message. This executable may not exist on platforms, which will make the tests fail. Guard them with the ICONV prereq to fix such failures. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent effb0aa commit c70bea2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

t/t5550-http-fetch-dumb.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,32 +339,32 @@ test_expect_success 'fetch can handle previously-fetched .idx files' '
339339
'
340340

341341
test_expect_success 'did not use upload-pack service' '
342-
! grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log"
342+
test_grep ! "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log"
343343
'
344344

345-
test_expect_success 'git client shows text/plain errors' '
345+
test_expect_success ICONV 'git client shows text/plain errors' '
346346
test_must_fail git clone "$HTTPD_URL/error/text" 2>stderr &&
347-
grep "this is the error message" stderr
347+
test_grep "this is the error message" stderr
348348
'
349349

350-
test_expect_success 'git client does not show html errors' '
350+
test_expect_success ICONV 'git client does not show html errors' '
351351
test_must_fail git clone "$HTTPD_URL/error/html" 2>stderr &&
352-
! grep "this is the error message" stderr
352+
test_grep ! "this is the error message" stderr
353353
'
354354

355-
test_expect_success 'git client shows text/plain with a charset' '
355+
test_expect_success ICONV 'git client shows text/plain with a charset' '
356356
test_must_fail git clone "$HTTPD_URL/error/charset" 2>stderr &&
357-
grep "this is the error message" stderr
357+
test_grep "this is the error message" stderr
358358
'
359359

360360
test_expect_success ICONV 'http error messages are reencoded' '
361361
test_must_fail git clone "$HTTPD_URL/error/utf16" 2>stderr &&
362-
grep "this is the error message" stderr
362+
test_grep "this is the error message" stderr
363363
'
364364

365365
test_expect_success ICONV 'reencoding is robust to whitespace oddities' '
366366
test_must_fail git clone "$HTTPD_URL/error/odd-spacing" 2>stderr &&
367-
grep "this is the error message" stderr
367+
test_grep "this is the error message" stderr
368368
'
369369

370370
check_language () {
@@ -406,7 +406,7 @@ ja;q=0.95, zh;q=0.94, sv;q=0.93, pt;q=0.92, nb;q=0.91, *;q=0.90" \
406406

407407
test_expect_success 'git client send an empty Accept-Language' '
408408
GIT_TRACE_CURL=true LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr &&
409-
! grep "^=> Send header: Accept-Language:" stderr
409+
test_grep ! "^=> Send header: Accept-Language:" stderr
410410
'
411411

412412
test_expect_success 'remote-http complains cleanly about malformed urls' '

0 commit comments

Comments
 (0)