Rev 5781: Add a test for appendpath support in no-name section. in file:///home/vila/src/bzr/experimental/config/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed May 4 17:26:12 UTC 2011
At file:///home/vila/src/bzr/experimental/config/
------------------------------------------------------------
revno: 5781
revision-id: v.ladeuil+lp at free.fr-20110504172612-52wwntkp37k6v8jh
parent: v.ladeuil+lp at free.fr-20110504163547-5o6it26l0oju8dg1
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-concrete-stacks
timestamp: Wed 2011-05-04 19:26:12 +0200
message:
Add a test for appendpath support in no-name section.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py 2011-05-03 17:44:32 +0000
+++ b/bzrlib/tests/test_config.py 2011-05-04 17:26:12 +0000
@@ -2185,6 +2185,19 @@
self.assertEquals(['baz', 'bar/baz'],
[section.extra_path for section in sections])
+ def test_appendpath_in_no_name_section(self):
+ # It's a bit weird to allow appendpath in a no-name section, but
+ # someone may found a use for it
+ store = self.get_store('foo.conf')
+ store._load_from_string('''
+foo=bar
+foo:policy = appendpath
+''')
+ matcher = config.LocationMatcher(store, 'dir/subdir')
+ sections = list(matcher.get_sections())
+ self.assertLength(1, sections)
+ self.assertEquals('bar/dir/subdir', sections[0].get('foo'))
+
class TestStackGet(tests.TestCase):
More information about the bazaar-commits
mailing list