tests: add helper script for processing doctests read from stdin
Writes stdin to a temp file and doctests it.
In the future we might want to spare the temp file and directly call into
doctest.
Also, with some tweaking it seems possible to adjust the line numbers reported
in an error report so they match the ones in the original file.
[ original upstream message ]
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.
[ original upstream message ]