~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_delta.py

  • Committer: Martin Pool
  • Date: 2010-08-18 07:25:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5383.
  • Revision ID: mbp@sourcefrog.net-20100818072522-uk3gsazoia3l3s0a
Start adding 'what's new in 2.3'

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        reporter.report(file_id, (old_path, path), versioned_change, renamed,
66
66
            modified, exe_change, kind)
67
67
        if expected_lines is not None:
68
 
            self.assertEqualDiff('\n'.join(expected_lines), '\n'.join(result))
 
68
            for i in range(len(expected_lines)):
 
69
                self.assertEqualDiff(expected_lines[i], result[i])
69
70
        else:
70
71
            self.assertEqual([], result)
71
72
 
122
123
            renamed=False, modified='created', exe_change=False,
123
124
            kind=(None, 'file'), unversioned_filter=lambda x:True)
124
125
 
125
 
    def test_missing(self):
126
 
        self.assertReport('+!  missing.c', file_id=None, path='missing.c',
127
 
             old_path=None, versioned_change='added',
128
 
             renamed=False, modified='missing', exe_change=False,
129
 
             kind=(None, None))
130
 
 
131
126
    def test_view_filtering(self):
132
127
        # If a file in within the view, it should appear in the output
133
128
        expected_lines = [
285
280
                                  ('branch/f2', '2\n'),
286
281
                                  ('branch/f3', '3\n'),
287
282
                                  ('branch/f4', '4\n'),
288
 
                                  ('branch/f5', '5\n'),
289
283
                                  ('branch/dir/',),
290
284
                                 ])
291
285
        wt.add(['f1', 'f2', 'f3', 'f4', 'dir'],
292
286
               ['f1-id', 'f2-id', 'f3-id', 'f4-id', 'dir-id'])
293
287
        wt.commit('commit one', rev_id='1')
294
288
 
295
 
        # TODO add rename,removed,etc. here?
296
 
        wt.add('f5')
297
 
        os.unlink('branch/f5')
298
 
 
299
289
        long_status = """added:
300
290
  dir/
301
291
  f1
302
292
  f2
303
293
  f3
304
294
  f4
305
 
missing:
306
 
  f5
307
295
"""
308
296
        short_status = """A  dir/
309
297
A  f1
310
298
A  f2
311
299
A  f3
312
300
A  f4
313
 
!  f5
314
301
"""
315
302
 
316
303
        repo = wt.branch.repository