t5551: simplify expected cookie file
commit87d38afa0d6900fa2c3ddeba51528af9d26cd161
authorJeff King <peff@peff.net>
Thu, 23 Feb 2023 11:01:31 +0000 (23 06:01 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2023 21:01:15 +0000 (23 13:01 -0800)
tree507293c348b9bb4752c8378a44b42f91d2019c56
parent795d713e2c3f5da18f35958a7f1c81cc5b36e312
t5551: simplify expected cookie file

After making an HTTP request that should store cookies, we check that
the expected values are in the cookie file. We don't want to look at the
whole file, because it has noisy comments at the top that we shouldn't
depend on. But we strip out the interesting bits using "tail -3", which
is brittle. It requires us to put an extra blank line in our expected
output, and it would fail to notice any reordering or extra content in
the cookie file.

Instead, let's just grep for non-blank lines that are not comments,
which more directly describes what we're interested in.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5551-http-fetch-smart.sh