~jelmer/ubuntu/maverick/bzr/2.2.5

« back to all changes in this revision

Viewing changes to bzrlib/tests/tree_implementations/test_path_content_summary.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-03-10 14:11:59 UTC
  • mfrom: (1.2.1 upstream) (3.1.68 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090310141159-lwzzo5c1fwrtzgj4
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib.osutils import supports_executable
 
21
from bzrlib.osutils import supports_executable, _fs_enc
22
22
from bzrlib.tests import SymlinkFeature, TestSkipped, TestNotApplicable
23
23
from bzrlib.tests.tree_implementations import TestCaseWithTree
24
24
 
39
39
        summary = self._convert_tree(tree).path_content_summary('path')
40
40
        self.assertEqual(('symlink', None, None, 'target'), summary)
41
41
 
 
42
    def test_unicode_symlink_content_summary(self):
 
43
        self.requireFeature(SymlinkFeature)
 
44
        tree = self.make_branch_and_tree('tree')
 
45
        try:
 
46
            os.symlink('target', u'tree/\u03b2-path'.encode(_fs_enc))
 
47
        except UnicodeError:
 
48
            raise TestSkipped(
 
49
                'This platform does not support unicode file paths.')
 
50
 
 
51
        tree.add([u'\u03b2-path'])
 
52
        summary = self._convert_tree(tree).path_content_summary(u'\u03b2-path')
 
53
        self.assertEqual(('symlink', None, None, 'target'), summary)
 
54
 
42
55
    def test_missing_content_summary(self):
43
56
        tree = self.make_branch_and_tree('tree')
44
57
        summary = self._convert_tree(tree).path_content_summary('path')