comparison tests/test_diff.py @ 244:28d0ee605308

Move diff to svncommands.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 08 Apr 2009 18:21:47 +0200
parents 46f6b872c988
children 7932d098cb5f
comparison
equal deleted inserted replaced
243:2027f851d60c 244:28d0ee605308
1 import unittest 1 import unittest
2 2
3 from mercurial import ui 3 from mercurial import ui
4 4
5 import diff_cmd 5 import svncommands
6 6
7 import test_util 7 import test_util
8 8
9 expected_diff_output = '''Index: alpha 9 expected_diff_output = '''Index: alpha
10 =================================================================== 10 ===================================================================
30 self._load_fixture_and_fetch('two_revs.svndump') 30 self._load_fixture_and_fetch('two_revs.svndump')
31 self.commitchanges([('foo', 'foo', 'This is missing a newline.'), 31 self.commitchanges([('foo', 'foo', 'This is missing a newline.'),
32 ('alpha', 'alpha', 'alpha\n\nadded line\n'), 32 ('alpha', 'alpha', 'alpha\n\nadded line\n'),
33 ]) 33 ])
34 u = ui.ui() 34 u = ui.ui()
35 diff_cmd.diff_command(u, self.repo, self.wc_path) 35 svncommands.diff(u, self.repo, self.wc_path)
36 self.assertEqual(u.stream.getvalue(), expected_diff_output) 36 self.assertEqual(u.stream.getvalue(), expected_diff_output)
37 37
38 38
39 def suite(): 39 def suite():
40 all = [unittest.TestLoader().loadTestsFromTestCase(DiffTests), 40 all = [unittest.TestLoader().loadTestsFromTestCase(DiffTests),