~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Olaf Conradi
  • Date: 2006-03-28 23:30:02 UTC
  • mto: (1661.1.1 bzr.mbp.remember)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: olaf@conradi.org-20060328233002-f6262df0e19c1963
Added testcases for using pull with --remember. Moved remember code to
beginning of cmd_pull. This remembers the location in case of a failure
during pull.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# (C) 2005 Canonical
2
2
 
3
 
from bzrlib.selftest import TestCase
 
3
from bzrlib.tests import TestCase
4
4
from bzrlib.commands import Command, parse_args
5
5
from bzrlib.builtins import cmd_commit, cmd_log, cmd_status
6
6
 
29
29
        """Options have help strings."""
30
30
        out, err = self.run_bzr_captured(['commit', '--help'])
31
31
        self.assertContainsRe(out, r'--file.*file containing commit message')
 
32
        self.assertContainsRe(out, r'--help.*-h')
32
33
 
33
34
    def test_option_help_global(self):
34
35
        """Global options have help strings."""
41
42
        self.assertEquals(err, '')
42
43
        self.assertContainsRe(out, r'--file[ =]MSGFILE')
43
44
 
 
45
    def test_unknown_short_opt(self):
 
46
        out, err = self.run_bzr_captured(['help', '-r'], retcode=3)
 
47
        self.assertContainsRe(err, r'unknown short option')
 
48
 
44
49
 
45
50
#     >>> parse_args('log -r 500'.split())
46
51
#     (['log'], {'revision': [<RevisionSpec_int 500>]})