~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_symlinks.py

  • Committer: Martin Pool
  • Date: 2010-07-16 16:27:39 UTC
  • mto: (4634.158.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 5379.
  • Revision ID: mbp@canonical.com-20100716162739-qtdtbjbi8txdh3wt
Add reproduction for bug 192859

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Test symlink support.
18
18
"""
19
19
 
 
20
import os
 
21
 
20
22
from bzrlib import (
21
23
    builtins,
22
24
    tests,
54
56
            tree.kind(tree.path2id('link')))
55
57
 
56
58
 
 
59
class TestKindChanges(TestCaseWithWorkingTree):
 
60
 
 
61
    def test_symlink_to_dir(self):
 
62
        # https://bugs.launchpad.net/bzr/+bug/192859
 
63
        tree = self.make_branch_and_tree('tree')
 
64
        self.build_tree_contents([
 
65
            ('tree/a@', 'target')])
 
66
        tree.smart_add(['tree/a'])
 
67
        tree.commit('add symlink')
 
68
        os.unlink('tree/a')
 
69
        self.build_tree_contents([
 
70
            ('tree/a/',),
 
71
            ('tree/a/f', 'content'),
 
72
            ])
 
73
        # fails
 
74
        tree.commit('change to dir')
 
75
 
 
76
 
57
77
class TestOpenTree(TestCaseWithWorkingTree):
58
78
 
59
79
    _test_needs_features = [tests.SymlinkFeature]