diff tests/test-highlight.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 f2719b387380
children 1ae119269ddc
line wrap: on
line diff
--- a/tests/test-highlight.t	Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-highlight.t	Thu Jun 21 03:05:02 2012 +0200
@@ -55,7 +55,7 @@
 
 hgweb filerevision, html
 
-  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py') \
+  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py') \
   >     | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
   200 Script output follows
   
@@ -183,7 +183,7 @@
 
 hgweb fileannotate, html
 
-  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py') \
+  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py') \
   >     | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g"
   200 Script output follows
   
@@ -509,7 +509,7 @@
 
 hgweb fileannotate, raw
 
-  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py?style=raw') \
+  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py?style=raw') \
   >     | sed "s/test@//" > a
   $ echo "200 Script output follows" > b
   $ echo "" >> b
@@ -523,7 +523,7 @@
 
 hgweb filerevision, raw
 
-  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py?style=raw') \
+  $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py?style=raw') \
   >     > a
   $ echo "200 Script output follows" > b
   $ echo "" >> b
@@ -532,7 +532,7 @@
 
 hgweb highlightcss friendly
 
-  $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
+  $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
   $ head -n 4 out
   200 Script output follows
   
@@ -559,7 +559,7 @@
 
 hgweb highlightcss fruity
 
-  $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
+  $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
   $ head -n 4 out
   200 Script output follows
   
@@ -583,7 +583,7 @@
   >     cat hg.pid >> $DAEMON_PIDS
   > 
   >     echo % hgweb filerevision, html
-  >     "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
+  >     "$TESTDIR/get-with-headers.py" localhost:$HGPORT "file/tip/$2" \
   >         | grep '<div class="parity0 source">'
   >     echo % errors encountered
   >     cat errors.log