/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_osutils.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
        self.assertEqual('path/to/foo', osutils._win32_normpath('path//from/../to/./foo'))
177
177
 
178
178
    def test_getcwd(self):
179
 
        self.assertEqual(os.getcwdu().replace('\\', '/'), osutils._win32_getcwd())
 
179
        cwd = osutils._win32_getcwd()
 
180
        os_cwd = os.getcwdu()
 
181
        self.assertEqual(os_cwd[1:].replace('\\', '/'), cwd[1:])
 
182
        # win32 is inconsistent whether it returns lower or upper case
 
183
        # and even if it was consistent the user might type the other
 
184
        # so we force it to uppercase
 
185
        # running python.exe under cmd.exe return capital C:\\
 
186
        # running win32 python inside a cygwin shell returns lowercase
 
187
        self.assertEqual(os_cwd[0].upper(), cwd[0])
 
188
 
 
189
    def test_fixdrive(self):
 
190
        self.assertEqual('H:/foo', osutils._win32_fixdrive('h:/foo'))
 
191
        self.assertEqual('H:/foo', osutils._win32_fixdrive('H:/foo'))
 
192
        self.assertEqual('C:\\foo', osutils._win32_fixdrive('c:\\foo'))
180
193
 
181
194
 
182
195
class TestWin32FuncsDirs(TestCaseInTempDir):