summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2011-08-29 02:42:21 -0400
committerJunio C Hamano <gitster@pobox.com>2011-08-28 23:50:04 -0700
commitf6918da789b07fabbc82e189d0bac50a79622828 (patch)
tree3574fc57c82e9380b626fc398353cda2d640d3bb
parent6a7f71d376becc1a5b0357b682dd0c20842104b0 (diff)
downloadgit-f6918da789b07fabbc82e189d0bac50a79622828.tar.gz
t5540-http-test: shorten grep pattern
On OS X, the grep pattern "\"OP .*/objects/$x2/X38_X40 HTTP/[.0-9]*\" 20[0-9] " is too long ($x38 and $x40 represent 38 and 40 copies of [0-9a-f]) for grep to handle. In order to still be able to match this, use the sed invocation to replace what we're looking for with a token. Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5540-http-push.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index a266ca5636..64767d8705 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -132,8 +132,12 @@ x38="$x5$x5$x5$x5$x5$x5$x5$x1$x1$x1"
x40="$x38$x2"
test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '
- sed -e "s/PUT /OP /" -e "s/MOVE /OP /" "$HTTPD_ROOT_PATH"/access.log |
- grep -e "\"OP .*/objects/$x2/${x38}_$x40 HTTP/[.0-9]*\" 20[0-9] "
+ sed \
+ -e "s/PUT /OP /" \
+ -e "s/MOVE /OP /" \
+ -e "s|/objects/$x2/${x38}_$x40|WANTED_PATH_REQUEST|" \
+ "$HTTPD_ROOT_PATH"/access.log |
+ grep -e "\"OP .*WANTED_PATH_REQUEST HTTP/[.0-9]*\" 20[0-9] "
'