~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Robert Collins
  • Date: 2007-02-06 23:53:30 UTC
  • mfrom: (2268 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2274.
  • Revision ID: robertc@robertcollins.net-20070206235330-2sy67ccuq0ksubqa
Merge HEAD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                              Transport,
40
40
                              )
41
41
from bzrlib.transport.memory import MemoryTransport
42
 
from bzrlib.transport.local import LocalTransport
 
42
from bzrlib.transport.local import (LocalTransport,
 
43
                                    EmulatedWin32LocalTransport)
43
44
 
44
45
 
45
46
# TODO: Should possibly split transport-specific tests into their own files.
551
552
        t = get_transport(here_url)
552
553
        self.assertIsInstance(t, LocalTransport)
553
554
        self.assertEquals(t.base, here_url)
 
555
 
 
556
 
 
557
class TestWin32LocalTransport(TestCase):
 
558
 
 
559
    def test_unc_clone_to_root(self):
 
560
        # Win32 UNC path like \\HOST\path
 
561
        # clone to root should stop at least at \\HOST part
 
562
        # not on \\
 
563
        t = EmulatedWin32LocalTransport('file://HOST/path/to/some/dir/')
 
564
        for i in xrange(4):
 
565
            t = t.clone('..')
 
566
        self.assertEquals(t.base, 'file://HOST/')
 
567
        # make sure we reach the root
 
568
        t = t.clone('..')
 
569
        self.assertEquals(t.base, 'file://HOST/')