36
36
self.assertEqual('', err)
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'])
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'])
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'])
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'])
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'])
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'])
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'])
70
69
class TestConfigDisplay(tests.TestCaseWithTransport):
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',
121
120
script.run_script(self, '''\
122
121
$ brz config -d tree
125
bzr.transform.orphan_policy = move
124
transform.orphan_policy = move
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',
131
130
script.run_script(self, '''\
132
$ brz config -d tree bzr.transform.orphan_policy
131
$ brz config -d tree transform.orphan_policy