Skip to content
Snippets Groups Projects
Commit f01ae031 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan
Browse files

dispatch: add doctests for _earlygetopt

parent 3f5e75c2
No related branches found
No related tags found
No related merge requests found
......@@ -485,6 +485,18 @@
The values are listed in the order they appear in args.
The options and values are removed from args.
>>> args = ['x', '--cwd', 'foo', 'y']
>>> _earlygetopt(['--cwd'], args), args
(['foo'], ['x', 'y'])
>>> args = ['x', '-R', 'foo', 'y']
>>> _earlygetopt(['-R'], args), args
(['foo'], ['x', 'y'])
>>> args = ['x', '-Rbar', 'y']
>>> _earlygetopt(['-R'], args), args
(['bar'], ['x', 'y'])
"""
try:
argcount = args.index("--")
......
......@@ -27,6 +27,9 @@
import mercurial.url
doctest.testmod(mercurial.url)
import mercurial.dispatch
doctest.testmod(mercurial.dispatch)
import mercurial.encoding
doctest.testmod(mercurial.encoding)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment