annotate tests/test-hg-parseurl.py @ 9622:9d1a480ca6ea

gendoc: fix synopsis The synopsis is used as an inline literal when generating the manpage. There should not be any whitespace on the inside of the quotation marks in inline literals. Commands with an empty synopsis (such as tags) produces ``tags `` as synopsis, which triggers a warning.
author Martin Geisler <mg@lazybytes.net>
date Tue, 20 Oct 2009 22:42:49 +0200
parents 29bc5d18714a
children d757bc0c7865
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8174
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
1 #!/usr/bin/env python
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
2
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
3 from mercurial.hg import parseurl
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
4
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
5 def testparse(url, rev=[]):
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
6 print '%s, revs: %r, checkout: %r' % parseurl(url, rev)
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
7
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
8 testparse('http://example.com/no/anchor')
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
9 testparse('http://example.com/an/anchor#foo')
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
10 testparse('http://example.com/no/anchor/revs', rev=['foo'])
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
11 testparse('http://example.com/an/anchor/revs#bar', rev=['foo'])
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
12 testparse('http://example.com/an/anchor/rev-None#foo', rev=None)