~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-20 17:46:30 UTC
  • mfrom: (2978.8.5 mv.change.case)
  • Revision ID: pqm@pqm.ubuntu.com-20071120174630-11911fovhobm06cp
Rename on Windows is able to change filename case. (#77740)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 
94
94
    # TODO: test fancy_rename using a MemoryTransport
95
95
 
 
96
    def test_rename_change_case(self):
 
97
        # on Windows we should be able to change filename case by rename
 
98
        self.build_tree(['a', 'b/'])
 
99
        osutils.rename('a', 'A')
 
100
        osutils.rename('b', 'B')
 
101
        # we can't use failUnlessExists on case-insensitive filesystem
 
102
        # so try to check shape of the tree
 
103
        shape = sorted(os.listdir('.'))
 
104
        self.assertEquals(['A', 'B'], shape)
 
105
 
96
106
    def test_01_rand_chars_empty(self):
97
107
        result = osutils.rand_chars(0)
98
108
        self.assertEqual(result, '')