Skip to content

Commit a58f4d6

Browse files
peffgitster
authored andcommitted
t5551: drop redundant grep for Accept-Language
Commit b0c4adc (remote-curl: send Accept-Language header to server, 2022-07-11) added tests to make sure the header is sent via HTTP. However, it checks in two places: 1. In the expected trace output, we check verbatim for the header and its value. 2. Afterwards, we grep for the header again in the trace file. This (2) is probably cargo-culted from the earlier grep for Accept-Encoding. It is needed for the encoding because we smudge the value of that header when doing the verbatim check; see 1a53e69 (remote-curl: accept all encodings supported by curl, 2018-05-22). But we don't do so for the language header, so any problem that the "grep" would catch in (2) would already have been caught by (1). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f1449a5 commit a58f4d6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

t/t5551-http-fetch-smart.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ test_expect_success 'clone http repository' '
103103
test_cmp exp actual.smudged &&
104104
105105
grep "Accept-Encoding:.*gzip" actual >actual.gzip &&
106-
test_line_count = 2 actual.gzip &&
107-
108-
grep "Accept-Language: ko-KR, *" actual >actual.language &&
109-
test_line_count = 2 actual.language
106+
test_line_count = 2 actual.gzip
110107
fi
111108
'
112109

0 commit comments

Comments
 (0)