/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_config.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        self.assertEqual('', err)
37
37
 
38
38
    def test_remove_unknown_option(self):
39
 
        self.run_bzr_error(['The "file" configuration option does not exist',],
 
39
        self.run_bzr_error(['The "file" configuration option does not exist', ],
40
40
                           ['config', '--remove', 'file'])
41
41
 
42
42
    def test_all_remove_exclusive(self):
43
 
        self.run_bzr_error(['--all and --remove are mutually exclusive.',],
 
43
        self.run_bzr_error(['--all and --remove are mutually exclusive.', ],
44
44
                           ['config', '--remove', '--all'])
45
45
 
46
46
    def test_all_set_exclusive(self):
47
 
        self.run_bzr_error(['Only one option can be set.',],
 
47
        self.run_bzr_error(['Only one option can be set.', ],
48
48
                           ['config', '--all', 'hello=world'])
49
49
 
50
50
    def test_remove_no_option(self):
51
 
        self.run_bzr_error(['--remove expects an option to remove.',],
 
51
        self.run_bzr_error(['--remove expects an option to remove.', ],
52
52
                           ['config', '--remove'])
53
53
 
54
54
    def test_unknown_option(self):
55
 
        self.run_bzr_error(['The "file" configuration option does not exist',],
 
55
        self.run_bzr_error(['The "file" configuration option does not exist', ],
56
56
                           ['config', 'file'])
57
57
 
58
58
    def test_unexpected_regexp(self):
59
59
        self.run_bzr_error(
60
 
            ['The "\*file" configuration option does not exist',],
 
60
            ['The "\\*file" configuration option does not exist', ],
61
61
            ['config', '*file'])
62
62
 
63
63
    def test_wrong_regexp(self):
64
64
        self.run_bzr_error(
65
 
            ['Invalid pattern\(s\) found. "\*file" nothing to repeat',],
 
65
            ['Invalid pattern\\(s\\) found. "\\*file" nothing to repeat', ],
66
66
            ['config', '--all', '*file'])
67
67
 
68
68
 
69
 
 
70
69
class TestConfigDisplay(tests.TestCaseWithTransport):
71
70
 
72
71
    def setUp(self):
116
115
            ''')
117
116
 
118
117
    def test_registry_value_all(self):
119
 
        self.breezy_config.set_user_option('bzr.transform.orphan_policy',
 
118
        self.breezy_config.set_user_option('transform.orphan_policy',
120
119
                                           u'move')
121
120
        script.run_script(self, '''\
122
121
            $ brz config -d tree
123
122
            breezy:
124
123
              [DEFAULT]
125
 
              bzr.transform.orphan_policy = move
 
124
              transform.orphan_policy = move
126
125
            ''')
127
126
 
128
127
    def test_registry_value_one(self):
129
 
        self.breezy_config.set_user_option('bzr.transform.orphan_policy',
 
128
        self.breezy_config.set_user_option('transform.orphan_policy',
130
129
                                           u'move')
131
130
        script.run_script(self, '''\
132
 
            $ brz config -d tree bzr.transform.orphan_policy
 
131
            $ brz config -d tree transform.orphan_policy
133
132
            move
134
133
            ''')
135
134