~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Vincent Ladeuil
  • Date: 2007-06-26 13:49:44 UTC
  • mto: (2581.1.1 cleanup-runbzr)
  • mto: This revision was merged to the branch mainline in revision 2588.
  • Revision ID: v.ladeuil+lp@free.fr-20070626134944-snlh5i0zsa30mysx
Enforce run_bzr(string) where possible.

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(['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(['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(['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(['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):