view tests/test-hg-parseurl.py @ 20581:7a72c28fdc76

test-help.t: add test for 'hg help extensions' This demonstrates the defect that deprecated extensions show up in the output. A followup patch will fix this defect.
author Augie Fackler <raf@durin42.com>
date Thu, 27 Feb 2014 15:37:04 -0500
parents 375872fdadba
children 8a23f88131c3
line wrap: on
line source

from mercurial.hg import parseurl

def testparse(url, branch=[]):
    print '%s, branches: %r' % 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')