/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/blackbox/test_mv.py

  • Committer: Lukáš Lalinský
  • Date: 2007-12-17 17:28:25 UTC
  • mfrom: (3120 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3123.
  • Revision ID: lalinsky@gmail.com-20071217172825-tr3pqm1mhvs3gwnn
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        os.chdir('..')
125
125
        self.assertMoved('sub1/sub2/hello.txt','sub1/hello.txt')
126
126
 
 
127
    def test_mv_change_case(self):
 
128
        # test for bug #77740 (mv unable change filename case on Windows)
 
129
        tree = self.make_branch_and_tree('.')
 
130
        self.build_tree(['test.txt'])
 
131
        tree.add(['test.txt'])
 
132
        self.run_bzr('mv test.txt Test.txt')
 
133
        # we can't use failUnlessExists on case-insensitive filesystem
 
134
        # so try to check shape of the tree
 
135
        shape = sorted(os.listdir(u'.'))
 
136
        self.assertEqual(['.bzr', 'Test.txt'], shape)
 
137
        self.assertInWorkingTree('Test.txt')
 
138
        self.assertNotInWorkingTree('test.txt')
 
139
 
127
140
    def test_mv_smoke_aliases(self):
128
141
        # just test that aliases for mv exist, if their behaviour is changed in
129
142
        # the future, then extend the tests.
272
285
        self.build_tree(['a']) #touch a
273
286
        self.run_bzr_error(
274
287
            ["^bzr: ERROR: Could not rename a => b because both files exist."
275
 
             " \(Use --after to update the Bazaar id\)$"],
 
288
             " \(Use --after to tell bzr about a rename that has already"
 
289
             " happened\)$"],
276
290
            'mv a b')
277
291
        self.failUnlessExists('a')
278
292
        self.failUnlessExists('b')
320
334
        self.build_tree(['a2']) #touch a2
321
335
 
322
336
        self.run_bzr_error(
323
 
            ["^bzr: ERROR: Could not rename a1 => sub/a1 because both files exist."
324
 
             " \(Use --after to update the Bazaar id\)$"],
 
337
            ["^bzr: ERROR: Could not rename a1 => sub/a1 because both files"
 
338
             " exist. \(Use --after to tell bzr about a rename that has already"
 
339
             " happened\)$"],
325
340
            'mv a1 a2 sub')
326
341
        self.failUnlessExists('a1')
327
342
        self.failUnlessExists('a2')