Skip to content

Commit a4ca455

Browse files
szedergitster
authored andcommitted
t5812: add 'test_i18ngrep's missing filename parameter
The second 'test_i18ngrep' invocation in the test 'curl redirects respect whitelist' is missing its filename parameter. This has remained unnoticed since its introduction in f4113ca (http: limit redirection to protocol-whitelist, 2015-09-22), because it would only cause the test to fail if Git was built with a sufficiently old libcurl version. The test's two ||-chained 'test_i18ngrep' invocations are supposed to check that either one of the two patterns is present in 'git clone's error message. As it happens, the first invocation covers the error message from any reasonably up-to-date libcurl, thus the second invocation, the one without the filename parameter, isn't executed at all. Apparently no one has run the test suite's httpd tests with such an old libcurl in the last 2+ years, or at least they haven't bothered to notify us about the failed test. Fix this by consolidating the two patterns into a single extended regexp, eliminating the need for an ||-chained second 'test_i18ngrep' invocation. Signed-off-by: SZEDER Gábor <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8cdef01 commit a4ca455

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

t/t5812-proto-disable-http.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ test_expect_success 'curl redirects respect whitelist' '
2020
test_must_fail env GIT_ALLOW_PROTOCOL=http:https \
2121
GIT_SMART_HTTP=0 \
2222
git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr &&
23-
{
24-
test_i18ngrep "ftp.*disabled" stderr ||
25-
test_i18ngrep "your curl version is too old"
26-
}
23+
test_i18ngrep -E "(ftp.*disabled|your curl version is too old)" stderr
2724
'
2825

2926
test_expect_success 'curl limits redirects' '

0 commit comments

Comments
 (0)