~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Aaron Bentley
  • Date: 2008-02-24 16:42:13 UTC
  • mfrom: (3234 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: aaron@aaronbentley.com-20080224164213-eza1lzru5bwuwmmj
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
541
541
        #test('.', 'http://host/', 'http://host')
542
542
        test('http://host', 'http://host/', 'http://host')
543
543
 
 
544
        # On Windows file:///C:/path/to and file:///D:/other/path
 
545
        # should not use relative url over the non-existent '/' directory.
 
546
        if sys.platform == 'win32':
 
547
            # on the same drive
 
548
            test('../../other/path',
 
549
                'file:///C:/path/to', 'file:///C:/other/path')
 
550
            #~next two tests is failed, i.e. urlutils.relative_url expects
 
551
            #~to see normalized file URLs?
 
552
            #~test('../../other/path',
 
553
            #~    'file:///C:/path/to', 'file:///c:/other/path')
 
554
            #~test('../../other/path',
 
555
            #~    'file:///C:/path/to', 'file:///C|/other/path')
 
556
 
 
557
            # check UNC paths too
 
558
            test('../../other/path',
 
559
                'file://HOST/base/path/to', 'file://HOST/base/other/path')
 
560
            # on different drives
 
561
            test('file:///D:/other/path',
 
562
                'file:///C:/path/to', 'file:///D:/other/path')
 
563
            # TODO: strictly saying in UNC path //HOST/base is full analog
 
564
            # of drive letter for hard disk, and this situation is also
 
565
            # should be exception from rules. [bialix 20071221]
 
566
 
544
567
 
545
568
class TestCwdToURL(TestCaseInTempDir):
546
569
    """Test that local_path_to_url works base on the cwd"""