Mercurial > public > mercurial-scm > hg-stable
diff tests/test-url.py @ 15496:396e83d635a6 stable
url: handle file://localhost/c:/foo "correctly"
The path was parsed correctly, but localpath prepended an extra '/' (as in
'/c:/foo') because it assumed it was an absolute unix path.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 16 Nov 2011 00:10:56 +0100 |
parents | 474279be5add |
children | 646759147717 8f4bad72d8b1 |
line wrap: on
line diff
--- a/tests/test-url.py Wed Nov 16 00:10:52 2011 +0100 +++ b/tests/test-url.py Wed Nov 16 00:10:56 2011 +0100 @@ -223,6 +223,14 @@ >>> u.localpath() 'f:oo/bar/baz' + >>> u = url('file://localhost/f:oo/bar/baz') + >>> u + <url scheme: 'file', host: 'localhost', path: 'f:oo/bar/baz'> + >>> str(u) + 'file://localhost/f%3Aoo/bar/baz' + >>> u.localpath() + 'f:oo/bar/baz' + >>> u = url('file:foo/bar/baz') >>> u <url scheme: 'file', path: 'foo/bar/baz'>