comparison tests/test_push_eol.py @ 1106:5cb6c95e0283 stable

Merge default and stable so I can do stable releases again.
author Augie Fackler <raf@durin42.com>
date Tue, 11 Feb 2014 12:48:49 -0500
parents 23992b41b6b7
children
comparison
equal deleted inserted replaced
1020:b5b1fce26f1f 1106:5cb6c95e0283
1 import test_util 1 import test_util
2 2
3 import unittest 3 import unittest
4 4
5 class TestPushEol(test_util.TestBase): 5 class TestPushEol(test_util.TestBase):
6 obsolete_mode_tests = True
7 stupid_mode_tests = True
8
6 def setUp(self): 9 def setUp(self):
7 test_util.TestBase.setUp(self) 10 test_util.TestBase.setUp(self)
8 self._load_fixture_and_fetch('emptyrepo.svndump') 11 self._load_fixture_and_fetch('emptyrepo.svndump')
9 12
10 def _test_push_dirs(self, stupid): 13 def test_push_dirs(self):
11 changes = [ 14 changes = [
12 # Root files with LF, CRLF and mixed EOL 15 # Root files with LF, CRLF and mixed EOL
13 ('lf', 'lf', 'a\nb\n\nc'), 16 ('lf', 'lf', 'a\nb\n\nc'),
14 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc'), 17 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc'),
15 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd'), 18 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd'),
16 ] 19 ]
17 self.commitchanges(changes) 20 self.commitchanges(changes)
18 self.pushrevisions(stupid) 21 self.pushrevisions()
19 self.assertchanges(changes, self.repo['tip']) 22 self.assertchanges(changes, self.repo['tip'])
20 23
21 changes = [ 24 changes = [
22 # Update all files once, with same EOL 25 # Update all files once, with same EOL
23 ('lf', 'lf', 'a\nb\n\nc\na\nb\n\nc'), 26 ('lf', 'lf', 'a\nb\n\nc\na\nb\n\nc'),
24 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc'), 27 ('crlf', 'crlf', 'a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc'),
25 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd'), 28 ('mixed', 'mixed', 'a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd'),
26 ] 29 ]
27 self.commitchanges(changes) 30 self.commitchanges(changes)
28 self.pushrevisions(stupid) 31 self.pushrevisions()
29 self.assertchanges(changes, self.repo['tip']) 32 self.assertchanges(changes, self.repo['tip'])
30
31 def test_push_dirs(self):
32 self._test_push_dirs(False)
33
34 def test_push_dirs_stupid(self):
35 self._test_push_dirs(True)
36
37 def suite():
38 all_tests = [unittest.TestLoader().loadTestsFromTestCase(TestPushEol),
39 ]
40 return unittest.TestSuite(all_tests)