~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testoptions.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:56:54 UTC
  • mfrom: (1185.16.59)
  • Revision ID: robertc@robertcollins.net-20051017115654-662239e1587524a8
mergeĀ fromĀ martin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# (C) 2005 Canonical
2
2
 
3
 
from bzrlib.tests import TestCase
 
3
from bzrlib.selftest 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')
33
32
 
34
33
    def test_option_help_global(self):
35
34
        """Global options have help strings."""
42
41
        self.assertEquals(err, '')
43
42
        self.assertContainsRe(out, r'--file[ =]MSGFILE')
44
43
 
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
 
 
49
44
 
50
45
#     >>> parse_args('log -r 500'.split())
51
46
#     (['log'], {'revision': [<RevisionSpec_int 500>]})