Mercurial > hg-stable
view tests/test-hg-parseurl.py @ 37185:ded5ea279a93
fix: new extension for automatically modifying file contents
This change implements most of the corresponding proposal as discussed at the
4.4 and 4.6 sprints: https://www.mercurial-scm.org/wiki/AutomaticFormattingPlan
This change notably does not include parallel execution of the formatter/fixer
tools. It does allow for implementing that without affecting other areas of the
code.
I believe the test coverage to be good, but this is a hotbed of corner cases.
Differential Revision: https://phab.mercurial-scm.org/D2897
author | Danny Hooper <hooper@google.com> |
---|---|
date | Sat, 03 Mar 2018 14:08:44 -0800 |
parents | d26c4af27978 |
children | 11d128a14ec0 |
line wrap: on
line source
from __future__ import absolute_import, print_function from mercurial import ( hg, ) def testparse(url, branch=[]): print('%s, branches: %r' % hg.parseurl(url, branch)) testparse('http://example.com/no/anchor') testparse('http://example.com/an/anchor#foo') testparse('http://example.com/no/anchor/branches', branch=['foo']) testparse('http://example.com/an/anchor/branches#bar', branch=['foo']) testparse('http://example.com/an/anchor/branches-None#foo', branch=None) testparse('http://example.com/') testparse('http://example.com') testparse('http://example.com#foo')