~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

Switch to PathsNotVersioned, accept extra_trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
 
276
276
''')
277
277
 
 
278
    def test_show_diff_specified(self):
 
279
        """A working-tree id can be used to identify a file"""
 
280
        self.wt.rename_one('file1', 'file1b')
 
281
        old_tree = self.b.repository.revision_tree('rev-1')
 
282
        new_tree = self.b.repository.revision_tree('rev-4')
 
283
        out_file = StringIO()
 
284
        show_diff_trees(old_tree, new_tree, to_file=out_file, 
 
285
                        specific_files=['file1b'], extra_trees=[self.wt])
 
286
        self.assertContainsRe(out_file.getvalue(), 'file1\t')
 
287
 
278
288
 
279
289
class TestPatienceDiffLib(TestCase):
280
290