~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-15 11:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5975.
  • Revision ID: v.ladeuil+lp@free.fr-20110615113605-p7zyyfry9wy1hquc
Make ContentConflict resolution more robust

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        # XXX: Using cmd_commit makes these tests overly sensitive to changes
44
44
        # to cmd_commit, when they are meant to be about option parsing in
45
45
        # general.
46
 
        self.assertEqual(
47
 
           ([], {'author': [], 'exclude': [], 'fixes': [], 'help': True}),
48
 
           parse_args(cmd_commit(), ['--help']))
49
 
        self.assertEqual(
50
 
           ([], {'author': [], 'exclude': [], 'fixes': [], 'message': 'biter'}),
51
 
           parse_args(cmd_commit(), ['--message=biter']))
 
46
        self.assertEqual(parse_args(cmd_commit(), ['--help']),
 
47
           ([], {'author': [], 'exclude': [], 'fixes': [], 'help': True}))
 
48
        self.assertEqual(parse_args(cmd_commit(), ['--message=biter']),
 
49
           ([], {'author': [], 'exclude': [], 'fixes': [], 'message': 'biter'}))
52
50
 
53
51
    def test_no_more_opts(self):
54
52
        """Terminated options"""
55
 
        self.assertEqual(
56
 
            (['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': []}),
57
 
            parse_args(cmd_commit(), ['--', '-file-with-dashes']))
 
53
        self.assertEqual(parse_args(cmd_commit(), ['--', '-file-with-dashes']),
 
54
                          (['-file-with-dashes'], {'author': [], 'exclude': [], 'fixes': []}))
58
55
 
59
56
    def test_option_help(self):
60
57
        """Options have help strings."""
68
65
        out, err = self.run_bzr('help status')
69
66
        self.assertContainsRe(out, r'--show-ids.*Show internal object.')
70
67
 
71
 
    def test_option_help_global_hidden(self):
72
 
        """Hidden global options have no help strings."""
73
 
        out, err = self.run_bzr('help log')
74
 
        self.assertNotContainsRe(out, r'--message')
75
 
 
76
68
    def test_option_arg_help(self):
77
69
        """Help message shows option arguments."""
78
70
        out, err = self.run_bzr('help commit')