~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Jonathan Lange
  • Date: 2007-04-13 03:50:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2446.
  • Revision ID: jml@canonical.com-20070413035020-z4gdg5sgmd5szc3o
Oops. Update tests to account for changed options to commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        """Option parser"""
39
39
        eq = self.assertEquals
40
40
        eq(parse_args(cmd_commit(), ['--help']),
41
 
           ([], {'help': True}))
 
41
           ([], {'fixes': [], 'help': True}))
42
42
        eq(parse_args(cmd_commit(), ['--message=biter']),
43
 
           ([], {'message': 'biter'}))
 
43
           ([], {'fixes': [], 'message': 'biter'}))
44
44
        ## eq(parse_args(cmd_log(),  '-r 500'.split()),
45
45
        ##   ([], {'revision': RevisionSpec_int(500)}))
46
46
 
47
47
    def test_no_more_opts(self):
48
48
        """Terminated options"""
49
49
        self.assertEquals(parse_args(cmd_commit(), ['--', '-file-with-dashes']),
50
 
                          (['-file-with-dashes'], {}))
 
50
                          (['-file-with-dashes'], {'fixes': []}))
51
51
 
52
52
    def test_option_help(self):
53
53
        """Options have help strings."""
112
112
 
113
113
    def test_allow_dash(self):
114
114
        """Test that we can pass a plain '-' as an argument."""
115
 
        self.assertEqual((['-'], {}), parse_args(cmd_commit(), ['-']))
 
115
        self.assertEqual(
 
116
            (['-'], {'fixes': []}), parse_args(cmd_commit(), ['-']))
116
117
 
117
118
    def parse(self, options, args):
118
119
        parser = option.get_optparser(dict((o.name, o) for o in options))