comparison tests/test_push_renames.py @ 96:9b5e528f67f8

Add a test to check EOLs are correctly converted
author Patrick Mezard <pmezard@gmail.com>
date Thu, 20 Nov 2008 22:41:16 -0600
parents 01e747937d35
children 067914ecb4eb
comparison
equal deleted inserted replaced
95:10dd34deac3b 96:9b5e528f67f8
18 w('R %s\n' % f) 18 w('R %s\n' % f)
19 else: 19 else:
20 w('U %s %r\n' % (f, ctx[f].data())) 20 w('U %s %r\n' % (f, ctx[f].data()))
21 if ctx[f].renamed(): 21 if ctx[f].renamed():
22 w('%s copied from %s\n' % (f, ctx[f].renamed()[0])) 22 w('%s copied from %s\n' % (f, ctx[f].renamed()[0]))
23
24 def assertchanges(self, changes, ctx):
25 for source, dest, data in changes:
26 if dest is None:
27 self.assertTrue(source not in ctx)
28 else:
29 self.assertTrue(dest in ctx)
30 if data is None:
31 data = ctx.parents()[0][source].data()
32 self.assertEqual(data, ctx[dest].data())
33 if dest != source:
34 copy = ctx[dest].renamed()
35 self.assertEqual(copy[0], source)
36 23
37 def test_push_renames(self): 24 def test_push_renames(self):
38 repo = self.repo 25 repo = self.repo
39 26
40 changes = [ 27 changes = [