comparison tests/test-hgweb-raw.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 3d71807c3a48
children 91aac2797c40
comparison
equal deleted inserted replaced
17016:468a950aebc3 17017:953faba28e91
15 $ hg commit -d "1 0" -m "Just some text" 15 $ hg commit -d "1 0" -m "Just some text"
16 16
17 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid 17 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
18 18
19 $ cat hg.pid >> $DAEMON_PIDS 19 $ cat hg.pid >> $DAEMON_PIDS
20 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt 20 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt
21 21
22 $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done 22 $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done
23 23
24 $ cat getoutput.txt 24 $ cat getoutput.txt
25 200 Script output follows 25 200 Script output follows
37 $ rm access.log error.log 37 $ rm access.log error.log
38 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \ 38 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
39 > --config web.guessmime=True 39 > --config web.guessmime=True
40 40
41 $ cat hg.pid >> $DAEMON_PIDS 41 $ cat hg.pid >> $DAEMON_PIDS
42 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt 42 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt
43 $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done 43 $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done
44 44
45 $ cat getoutput.txt 45 $ cat getoutput.txt
46 200 Script output follows 46 200 Script output follows
47 content-type: text/plain; charset="ascii" 47 content-type: text/plain; charset="ascii"