test-doctest: handle unix/windows path discrepancies
authorPatrick Mezard <pmezard@gmail.com>
Sun, 06 Mar 2011 14:17:47 +0100
changeset 13538 d24e97fd52a9
parent 13537 37f487b9fbcc
child 13539 b3330b8e1e6f
test-doctest: handle unix/windows path discrepancies
mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py	Sun Mar 06 10:06:09 2011 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sun Mar 06 14:17:47 2011 +0100
@@ -40,9 +40,10 @@
 def urlrepos(prefix, roothead, paths):
     """yield url paths and filesystem paths from a list of repo paths
 
-    >>> list(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt']))
+    >>> conv = lambda seq: [(v, util.pconvert(p)) for v,p in seq]
+    >>> conv(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt']))
     [('hg/r', '/opt/r'), ('hg/r/r', '/opt/r/r'), ('hg', '/opt')]
-    >>> list(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt']))
+    >>> conv(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt']))
     [('r', '/opt/r'), ('r/r', '/opt/r/r'), ('', '/opt')]
     """
     for path in paths: