/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_urlutils.py

  • Committer: Jared Bunting
  • Date: 2010-10-20 21:27:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5514.
  • Revision ID: jbunting@venom-20101020212748-zmuqf5rof072svh4
Modified _win32_local_path_from_url to:
 * raise InvalidURL error instead of string index out of range when invalid url isn't long enough to check for "C:"
 * create path when url is of form, "file:///C:" (without the trailing slash) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
418
418
        self.assertEqual(u'D:/path/to/r\xe4ksm\xf6rg\xe5s',
419
419
            from_url('file:///d:/path/to/r%c3%a4ksm%c3%b6rg%c3%a5s'))
420
420
        self.assertEqual('/', from_url('file:///'))
 
421
        self.assertEqual('C:', from_url('file:///C:'))
421
422
 
 
423
        self.assertRaises(InvalidURL, from_url, 'file:///c')
422
424
        self.assertRaises(InvalidURL, from_url, '/path/to/foo')
423
425
        # Not a valid _win32 url, no drive letter
424
426
        self.assertRaises(InvalidURL, from_url, 'file:///path/to/foo')