sapling/eden/scm/tests/test-hg-parseurl.py

22 lines
642 B
Python
Raw Normal View History

from __future__ import absolute_import, print_function
from edenscm.mercurial import hg
from testutil.dott import feature
feature.require(["py2"])
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")