aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-20 09:26:02 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-20 07:52:27 -0800
commitc70bea26c763ae0caa170af84c92128b533dd1e9 (patch)
tree2929c81ab456b38a5bf4347bd74c0b5dd2b4c971
parenteffb0aa84b3b3e6a16ed744fc9361257c7259d97 (diff)
downloadgit-c70bea26c763ae0caa170af84c92128b533dd1e9.tar.xz
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>
-rwxr-xr-xt/t5550-http-fetch-dumb.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index ed0ad66fad..05c34db780 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -339,32 +339,32 @@ test_expect_success 'fetch can handle previously-fetched .idx files' '
'
test_expect_success 'did not use upload-pack service' '
- ! grep "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log"
+ test_grep ! "/git-upload-pack" "$HTTPD_ROOT_PATH/access.log"
'
-test_expect_success 'git client shows text/plain errors' '
+test_expect_success ICONV 'git client shows text/plain errors' '
test_must_fail git clone "$HTTPD_URL/error/text" 2>stderr &&
- grep "this is the error message" stderr
+ test_grep "this is the error message" stderr
'
-test_expect_success 'git client does not show html errors' '
+test_expect_success ICONV 'git client does not show html errors' '
test_must_fail git clone "$HTTPD_URL/error/html" 2>stderr &&
- ! grep "this is the error message" stderr
+ test_grep ! "this is the error message" stderr
'
-test_expect_success 'git client shows text/plain with a charset' '
+test_expect_success ICONV 'git client shows text/plain with a charset' '
test_must_fail git clone "$HTTPD_URL/error/charset" 2>stderr &&
- grep "this is the error message" stderr
+ test_grep "this is the error message" stderr
'
test_expect_success ICONV 'http error messages are reencoded' '
test_must_fail git clone "$HTTPD_URL/error/utf16" 2>stderr &&
- grep "this is the error message" stderr
+ test_grep "this is the error message" stderr
'
test_expect_success ICONV 'reencoding is robust to whitespace oddities' '
test_must_fail git clone "$HTTPD_URL/error/odd-spacing" 2>stderr &&
- grep "this is the error message" stderr
+ test_grep "this is the error message" stderr
'
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" \
test_expect_success 'git client send an empty Accept-Language' '
GIT_TRACE_CURL=true LANGUAGE= git ls-remote "$HTTPD_URL/dumb/repo.git" 2>stderr &&
- ! grep "^=> Send header: Accept-Language:" stderr
+ test_grep ! "^=> Send header: Accept-Language:" stderr
'
test_expect_success 'remote-http complains cleanly about malformed urls' '