~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Wouter van Heyst
  • Date: 2006-06-07 16:05:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060607160527-2b3649154d0e2e84
more code cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        if sys.platform == 'win32':
35
35
            self.assertRaises(InvalidURL, basename, 'file:///path/to/foo')
36
36
            self.assertEqual('foo', basename('file:///C|/foo'))
37
 
            self.assertEqual('', basename('file:///C|/'))
 
37
            self.assertEqual('foo', basename('file:///C:/foo'))
 
38
            self.assertEqual('', basename('file:///C:/'))
38
39
        else:
39
40
            self.assertEqual('foo', basename('file:///foo'))
40
41
            self.assertEqual('', basename('file:///'))
247
248
 
248
249
    def test_win32_local_path_to_url(self):
249
250
        to_url = urlutils._win32_local_path_to_url
250
 
        self.assertEqual('file:///C|/path/to/foo',
 
251
        self.assertEqual('file:///C:/path/to/foo',
251
252
            to_url('C:/path/to/foo'))
252
253
 
253
254
        try:
255
256
        except UnicodeError:
256
257
            raise TestSkipped("local encoding cannot handle unicode")
257
258
 
258
 
        self.assertEqual('file:///D|/path/to/r%C3%A4ksm%C3%B6rg%C3%A5s', result)
 
259
        self.assertEqual('file:///D:/path/to/r%C3%A4ksm%C3%B6rg%C3%A5s', result)
259
260
 
260
261
    def test_win32_local_path_from_url(self):
261
262
        from_url = urlutils._win32_local_path_from_url