~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

Merge bzr.dev into cleanup resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1122
1122
            self.failUnless(t.has(link_name))
1123
1123
 
1124
1124
            st = t.stat(link_name)
1125
 
            self.failUnless(S_ISLNK(st.st_mode))
 
1125
            self.failUnless(S_ISLNK(st.st_mode),
 
1126
                "expected symlink, got mode %o" % st.st_mode)
1126
1127
        except TransportNotPossible:
1127
1128
            raise TestSkipped("Transport %s does not support symlinks." %
1128
1129
                              self._server.__class__)
1765
1766
        # also raise a special error
1766
1767
        self.assertListRaises((errors.ShortReadvError, errors.InvalidRange),
1767
1768
                              transport.readv, 'a', [(12,2)])
 
1769
 
 
1770
    def test_stat_symlink(self):
 
1771
        # if a transport points directly to a symlink (and supports symlinks
 
1772
        # at all) you can tell this.  helps with bug 32669.
 
1773
        t = self.get_transport()
 
1774
        try:
 
1775
            t.symlink('target', 'link')
 
1776
        except TransportNotPossible:
 
1777
            raise TestSkipped("symlinks not supported")
 
1778
        t2 = t.clone('link')
 
1779
        st = t2.stat('')
 
1780
        self.assertTrue(stat.S_ISLNK(st.st_mode))