541
541
#test('.', 'http://host/', 'http://host')
542
542
test('http://host', 'http://host/', 'http://host')
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':
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')
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]
545
568
class TestCwdToURL(TestCaseInTempDir):
546
569
"""Test that local_path_to_url works base on the cwd"""