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 <>

 I suppose a sed invocation to strip out the URL or comments might be better,
 but this seemed simpler.

 t/ | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/t/ b/t/
index 287d22b..8196af1 100755
--- a/t/
+++ b/t/
@@ -191,9 +191,6 @@ cat >cookies.txt <<EOF      FALSE   /smart_cookies/ FALSE   0       othername       
 cat >expect_cookies.txt <<EOF
-# Netscape HTTP Cookie File
-# This file was generated by libcurl! Edit at your own risk.      FALSE   /smart_cookies/ FALSE   0       othername       
othervalue      FALSE   /smart_cookies/repo.git/info/   FALSE   0       name    
@@ -202,7 +199,8 @@ test_expect_success 'cookies stored in http.cookiefile when 
http.savecookies set
        git config http.cookiefile cookies.txt &&
        git config http.savecookies true &&
        git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
-       test_cmp expect_cookies.txt cookies.txt
+       tail -3 cookies.txt > cookies_tail.txt
+       test_cmp expect_cookies.txt cookies_tail.txt
 test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to