[PATCH] t5540-http-test: shorten grep pattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On OS X, the grep pattern

    "\"OP .*/objects/$x2/X38_X40 HTTP/[.0-9]*\" 20[0-9] "

is far too long ($x38 and $x40 represent 38 and 40 copies of
[0-9a-f]).  In order to still be able to match this, use the sed
invocation to replace what we're looking for a token.

Signed-off-by: Brian Gernhardt <brian@xxxxxxxxxxxxxxxxxxxxx>
---
 t/t5540-http-push.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index a266ca5..5bf287d 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -132,8 +132,9 @@ 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/$x40/X40/" -e "s/$x38/X38/"\
+		"$HTTPD_ROOT_PATH"/access.log |
+	grep -e "\"OP .*/objects/$x2/X38_X40 HTTP/[.0-9]*\" 20[0-9] "
 
 '
 
-- 
1.7.6.671.g4d09b

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]