Mercurial > public > mercurial-scm > hg-stable
diff tests/test-archive.t @ 17017:953faba28e91
tests: prepare get-with-headers.py for MSYS
get-with-headers.py took the http GET parameter as a command line parameter
that had to start with '/'. MSYS on windows will mangle such paths.
Instead of applying a workaround everywhere (such as an extra '/') we let
get-with-headers.py add the mandatory '/'. That is consistent with the
url path handling in the Mercurial url class.
A few tests sent 'GET ?cmd=...' which is invalid. They will now send 'GET
/?cmd=...'.
This will not enable any tests for being run on windows - only remove one
reason they were disabled.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 21 Jun 2012 03:05:02 +0200 |
parents | 4dd036977463 |
children | d5a3bda6e170 133d13e44544 |
line wrap: on
line diff
--- a/tests/test-archive.t Wed Jun 20 23:41:21 2012 +0200 +++ b/tests/test-archive.t Thu Jun 21 03:05:02 2012 +0200 @@ -20,10 +20,10 @@ > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log > cat hg.pid >> $DAEMON_PIDS > echo % $1 allowed should give 200 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$2" | head -n 1 > echo % $3 and $4 disallowed should both give 403 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$3" | head -n 1 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$4" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$3" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$4" | head -n 1 > "$TESTDIR/killdaemons.py" > cat errors.log > cp .hg/hgrc-base .hg/hgrc @@ -56,7 +56,7 @@ invalid arch type should give 404 - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.invalid" | head -n 1 + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.invalid" | head -n 1 404 Unsupported archive type: None $ TIP=`hg id -v | cut -f1 -d' '`