Skip to content

Commit 580cf0a

Browse files
Benabikgitster
authored andcommitted
t5551: Remove header from curl cookie file
The URL included in the header appears to vary from curl version to curl version. Since we only care about the final few lines, only test them. However, make sure the blank line after the header is still included to make sure there are no extra cookie lines. Signed-off-by: Brian Gernhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 912b2ac commit 580cf0a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

t/t5551-http-fetch.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ cat >cookies.txt <<EOF
191191
127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
192192
EOF
193193
cat >expect_cookies.txt <<EOF
194-
# Netscape HTTP Cookie File
195-
# http://curl.haxx.se/docs/http-cookies.html
196-
# This file was generated by libcurl! Edit at your own risk.
197194
198195
127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
199196
127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value
@@ -202,7 +199,8 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
202199
git config http.cookiefile cookies.txt &&
203200
git config http.savecookies true &&
204201
git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
205-
test_cmp expect_cookies.txt cookies.txt
202+
tail -3 cookies.txt > cookies_tail.txt
203+
test_cmp expect_cookies.txt cookies_tail.txt
206204
'
207205

208206
test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE

0 commit comments

Comments
 (0)