~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Aaron Bentley
  • Date: 2006-02-01 18:08:46 UTC
  • mto: (1534.7.121 bzr.ttransform)
  • mto: This revision was merged to the branch mainline in revision 1558.
  • Revision ID: abentley@panoramicfeedback.com-20060201180846-c8f1200d1440c465
Implemented default command options

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
                      "email=Robert Collins <robertc@example.com>\n"
33
33
                      "editor=vim\n"
34
34
                      "gpg_signing_command=gnome-gpg\n"
35
 
                      "user_global_option=something\n")
 
35
                      "user_global_option=something\n"
 
36
                      "[COMMAND_DEFAULTS]\n"
 
37
                      'commit=-m "log message" #evil? possibly.\n'
 
38
                      'merge=--merge-type "weave')
36
39
 
37
40
 
38
41
sample_always_signatures = ("[DEFAULT]\n"
352
355
        my_config = self._get_sample_config()
353
356
        self.assertEqual(None, my_config.post_commit())
354
357
 
 
358
    def test_command_defaults(self):
 
359
        my_config = self._get_sample_config()
 
360
        self.assertEqual(['-m', 'log message'], 
 
361
                         my_config.get_command_defaults('commit'))
 
362
        self.assertEqual([], my_config.get_command_defaults('log'))
 
363
        self.assertRaises(errors.CommandDefaultSyntax, 
 
364
                          my_config.get_command_defaults, 'merge')
355
365
 
356
366
class TestLocationConfig(TestCase):
357
367