~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_escaped_store.py

 * New ``versionedfile.KeyMapper`` interface to abstract out the access to
   underyling .knit/.kndx etc files in repositories with partitioned
   storage. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        t = bzrlib.transport.get_transport(self.get_url())
35
35
        return TextStore(t, prefixed=prefixed, escaped=escaped)
36
36
 
37
 
    def test_paths(self):
38
 
        text_store = self.get_store()
39
 
 
40
 
        self.assertEqual('a', text_store._relpath('a'))
41
 
        self.assertEqual('a', text_store._relpath(u'a'))
42
 
        self.assertEqual('%2520', text_store._relpath(' '))
43
 
        self.assertEqual('%40%253a%253c%253e', text_store._relpath('@:<>'))
44
 
        self.assertEqual('%25c3%25a5', text_store._relpath(u'\xe5'))
45
 
 
46
37
    def test_prefixed(self):
47
38
        # Prefix should be determined by unescaped string
48
39
        text_store = self.get_store(prefixed=True)
58
49
        self.assertEqual('88/%2520', text_store._relpath(' '))
59
50
        self.assertEqual('72/%40%253a%253c%253e',
60
51
                text_store._relpath('@:<>'))
61
 
        self.assertEqual('77/%25c3%25a5', text_store._relpath(u'\xe5'))
62
52
 
63
53
    def test_files(self):
64
54
        text_store = self.get_store(prefixed=True)