changeset 8245:0eade101f762

Don't use sed -r; instead use old-style regexp Rev d895158fe8af introduced some sed -r tests, but -r is only available on GNU sed, while BSD sed uses -E. Better to use old-style regular expressions, that way the tests work on all sed variants.
author Martijn Pieters <mj@zopatista.com>
date Tue, 28 Apr 2009 17:17:54 +0200
parents 99d7e2db8da8
children 8846ebb844ac
files tests/test-hgwebdir
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-hgwebdir	Tue Apr 28 18:14:49 2009 +0200
+++ b/tests/test-hgwebdir	Tue Apr 28 17:17:54 2009 +0200
@@ -65,11 +65,11 @@
 echo % should succeed, slashy names
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper' \
-	| sed -r "s/[0-9]+ seconds? ago/seconds ago/"
+	| sed "s/[0-9]\{1,\} seconds\{0,1\} ago/seconds ago/"
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw'
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper' \
-	| sed -r "s/[0-9]+ seconds? ago/seconds ago/"
+	| sed "s/[0-9]\{1,\} seconds\{0,1\} ago/seconds ago/"
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom' \
 	| sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom' \