~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_mv.py

  • Committer: Daniel Watkins
  • Date: 2007-08-23 14:10:48 UTC
  • mto: (2759.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2760.
  • Revision ID: d.m.watkins@warwick.ac.uk-20070823141048-hlyyibw24f34voen
Updated tests to reflect new error text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        self.build_tree(['unversioned.txt'])
66
66
        self.run_bzr_error(
67
67
            ["^bzr: ERROR: Could not rename unversioned.txt => elsewhere."
68
 
             " .*unversioned.txt is not versioned$"],
 
68
             " .*unversioned.txt is not versioned\.$"],
69
69
            'mv unversioned.txt elsewhere')
70
70
 
71
71
    def test_mv_nonexisting(self):
72
72
        self.run_bzr_error(
73
73
            ["^bzr: ERROR: Could not rename doesnotexist => somewhereelse."
74
 
             " .*doesnotexist is not versioned$"],
 
74
             " .*doesnotexist is not versioned\.$"],
75
75
            'mv doesnotexist somewhereelse')
76
76
 
77
77
    def test_mv_unqualified(self):
83
83
        tree.add(['test.txt'])
84
84
 
85
85
        self.run_bzr_error(
86
 
            ["^bzr: ERROR: Could not move to sub1: sub1 is not versioned$"],
 
86
            ["^bzr: ERROR: Could not move to sub1: sub1 is not versioned\.$"],
87
87
            'mv test.txt sub1')
88
88
 
89
89
        self.run_bzr_error(
90
90
            ["^bzr: ERROR: Could not move test.txt => .*hello.txt: "
91
 
             "sub1 is not versioned$"],
 
91
             "sub1 is not versioned\.$"],
92
92
            'mv test.txt sub1/hello.txt')
93
93
        
94
94
    def test_mv_dirs(self):
177
177
        os.remove('b')
178
178
        osutils.rename('a', 'b')
179
179
        self.run_bzr_error(
180
 
            ["^bzr: ERROR: Could not move a => b. b is already versioned$"],
 
180
            ["^bzr: ERROR: Could not move a => b. b is already versioned\.$"],
181
181
            'mv a b')
182
182
        #check that nothing changed
183
183
        self.failIfExists('a')
213
213
 
214
214
        osutils.rename('a', 'sub/a')
215
215
        self.run_bzr_error(
216
 
            ["^bzr: ERROR: Could not move a => a: sub is not versioned$"],
 
216
            ["^bzr: ERROR: Could not move a => a: sub is not versioned\.$"],
217
217
            'mv a sub/a')
218
218
        self.failIfExists('a')
219
219
        self.failUnlessExists('sub/a')
249
249
 
250
250
        osutils.rename('a1', 'sub/a1')
251
251
        self.run_bzr_error(
252
 
            ["^bzr: ERROR: Could not move to sub. sub is not versioned$"],
 
252
            ["^bzr: ERROR: Could not move to sub. sub is not versioned\.$"],
253
253
            'mv a1 a2 sub')
254
254
        self.failIfExists('a1')
255
255
        self.failUnlessExists('sub/a1')