~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: John Arbash Meinel
  • Date: 2007-06-28 23:18:09 UTC
  • mfrom: (2562 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070628231809-pqbt7puoqj8bl07b
[merge] bzr.dev 2562

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
    def test_option_help(self):
53
53
        """Options have help strings."""
54
 
        out, err = self.run_bzr_captured(['commit', '--help'])
 
54
        out, err = self.run_bzr(['commit', '--help'])
55
55
        self.assertContainsRe(out, r'--file(.|\n)*file containing commit'
56
56
                                   ' message')
57
57
        self.assertContainsRe(out, r'-h.*--help')
58
58
 
59
59
    def test_option_help_global(self):
60
60
        """Global options have help strings."""
61
 
        out, err = self.run_bzr_captured(['help', 'status'])
 
61
        out, err = self.run_bzr(['help', 'status'])
62
62
        self.assertContainsRe(out, r'--show-ids.*show internal object')
63
63
 
64
64
    def test_option_arg_help(self):
65
65
        """Help message shows option arguments."""
66
 
        out, err = self.run_bzr_captured(['help', 'commit'])
 
66
        out, err = self.run_bzr(['help', 'commit'])
67
67
        self.assertEquals(err, '')
68
68
        self.assertContainsRe(out, r'--file[ =]MSGFILE')
69
69
 
70
70
    def test_unknown_short_opt(self):
71
 
        out, err = self.run_bzr_captured(['help', '-r'], retcode=3)
 
71
        out, err = self.run_bzr(['help', '-r'], retcode=3)
72
72
        self.assertContainsRe(err, r'no such option')
73
73
 
74
74
    def test_get_short_name(self):