# HG changeset patch # User John Coomes # Date 2009-02-28 01:28:26 # Node ID 490e40816cbd46c18fc7d654420bc00523487cf7 # Parent afddc32b2b3f380f7f42c740fc6a8cd2ec0dfe60 tests: strip o/s-dependent error messages from some http tests diff --git a/tests/test-bad-pull b/tests/test-bad-pull --- a/tests/test-bad-pull +++ b/tests/test-bad-pull @@ -1,7 +1,7 @@ #!/bin/sh -hg clone http://localhost:$HGPORT/ copy -echo $? +{ hg clone http://localhost:$HGPORT/ copy 2>&1; echo $?; } | \ + sed 's/error:.*/error:/' test -d copy || echo copy: No such file or directory cat > dumb.py <> $DAEMON_PIDS # give the server some time to start running sleep 1 -http_proxy= hg clone http://localhost:$HGPORT/foo copy2 2>&1 | \ +{ http_proxy= hg clone http://localhost:$HGPORT/foo copy2 2>&1; echo $?; } | \ sed -e 's/404.*/404/' -e 's/Date:.*/Date:/' -echo $? kill $! diff --git a/tests/test-bad-pull.out b/tests/test-bad-pull.out --- a/tests/test-bad-pull.out +++ b/tests/test-bad-pull.out @@ -1,5 +1,5 @@ -abort: error: Connection refused +abort: error: 255 copy: No such file or directory abort: HTTP Error 404 -0 +255 diff --git a/tests/test-http-proxy b/tests/test-http-proxy --- a/tests/test-http-proxy +++ b/tests/test-http-proxy @@ -36,7 +36,8 @@ echo %% url with user name and password http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e echo %% bad host:port for proxy -http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f +http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f 2>&1 | \ + sed 's/error:.*/error:/' echo %% do not use the proxy if it is in the no list http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g diff --git a/tests/test-http-proxy.out b/tests/test-http-proxy.out --- a/tests/test-http-proxy.out +++ b/tests/test-http-proxy.out @@ -48,7 +48,7 @@ added 1 changesets with 1 changes to 1 f updating working directory 1 files updated, 0 files merged, 0 files removed, 0 files unresolved %% bad host:port for proxy -abort: error: Connection refused +abort: error: %% do not use the proxy if it is in the no list requesting all changes adding changesets diff --git a/tests/test-static-http b/tests/test-static-http --- a/tests/test-static-http +++ b/tests/test-static-http @@ -2,8 +2,8 @@ cp "$TESTDIR"/printenv.py . -http_proxy= hg clone http://localhost:$HGPORT/ copy -echo $? +{ http_proxy= hg clone http://localhost:$HGPORT/ copy 2>&1; echo $?; } | \ + sed 's/error:.*/error:/' test -d copy || echo copy: No such file or directory # This server doesn't do range requests so it's basically only good for diff --git a/tests/test-static-http.out b/tests/test-static-http.out --- a/tests/test-static-http.out +++ b/tests/test-static-http.out @@ -1,4 +1,4 @@ -abort: error: Connection refused +abort: error: 255 copy: No such file or directory changeset: 0:53e17d176ae6