74
74
super(TestConfigDisplay, self).setUp()
75
75
_t_config.create_configs(self)
77
def test_multiline_all_values(self):
78
self.bazaar_config.set_user_option('multiline', '1\n2\n')
79
script.run_script(self, """\
87
def test_multiline_value_only(self):
88
self.bazaar_config.set_user_option('multiline', '1\n2\n')
89
script.run_script(self, """\
90
$ bzr config -d tree multiline
96
def test_list_all_values(self):
97
self.bazaar_config.set_user_option('list', [1, 'a', 'with, a comma'])
98
script.run_script(self, '''\
101
list = 1, a, "with, a comma"
104
def test_list_value_only(self):
105
self.bazaar_config.set_user_option('list', [1, 'a', 'with, a comma'])
106
script.run_script(self, '''\
107
$ bzr config -d tree list
108
1, a, "with, a comma"
111
77
def test_bazaar_config(self):
112
78
self.bazaar_config.set_user_option('hello', 'world')
113
79
script.run_script(self, '''\
140
class TestConfigDisplayWithPolicy(tests.TestCaseWithTransport):
142
def test_location_with_policy(self):
143
# LocationConfig is the only one dealing with policies so far.
144
self.make_branch_and_tree('tree')
148
url:policy = appendpath
151
""" % {'dir': self.test_dir}
152
# We don't use the config directly so we save it to disk
153
config.LocationConfig.from_string(config_text, 'tree', save=True)
154
# policies are displayed with their options since they are part of
155
# their definition, likewise the path is not appended, we are just
156
# presenting the relevant portions of the config files
157
script.run_script(self, '''\
158
$ bzr config -d tree --all url
164
url:policy = appendpath
168
106
class TestConfigActive(tests.TestCaseWithTransport):