test-hgwebdir: correctly include '-' in sed expression. stable
authorThomas Arendsen Hein <thomas@intevation.de>
Fri, 09 Apr 2010 15:14:43 +0200
branchstable
changeset 10878 c63a6ddbbf9a
parent 10875 a9702c47a19f
child 10880 4775fc1e04a8
child 10883 196908117c27
test-hgwebdir: correctly include '-' in sed expression. '\' can't be used to escape '-' from being interpreted as a range, so put it at the end.
tests/test-hgwebdir
--- a/tests/test-hgwebdir	Thu Apr 08 19:46:47 2010 +0200
+++ b/tests/test-hgwebdir	Fri Apr 09 15:14:43 2010 +0200
@@ -53,11 +53,11 @@
 
 echo % atom-log without basedir
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' \
-    | grep '<link' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<link' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 echo % rss-log without basedir
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' \
-    | grep '<guid' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<guid' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 cat > paths.conf <<EOF
 [paths]
@@ -128,11 +128,11 @@
 
 echo % atom-log with basedir /
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' \
-    | grep '<link' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<link' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 echo % rss-log with basedir /
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' \
-    | grep '<guid' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<guid' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 "$TESTDIR/killdaemons.py"
 
@@ -143,11 +143,11 @@
 
 echo % atom-log with basedir /foo/
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' \
-    | grep '<link' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<link' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 echo % rss-log with basedir /foo/
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' \
-    | grep '<guid' | sed 's|//[.a-zA-Z0-9\-_]*:[0-9][0-9]*/|//example.com:8080/|'
+    | grep '<guid' | sed 's|//[.a-zA-Z0-9_-]*:[0-9][0-9]*/|//example.com:8080/|'
 
 echo % paths errors 1
 cat error-paths-1.log