sapling/tests/test_push_eol.py

33 lines
1.0 KiB
Python
Raw Normal View History

2010-07-14 17:39:14 +04:00
import test_util
import unittest
2010-07-14 17:39:14 +04:00
class TestPushEol(test_util.TestBase):
obsolete_mode_tests = True
stupid_mode_tests = True
2010-07-14 17:39:14 +04:00
def setUp(self):
test_util.TestBase.setUp(self)
self._load_fixture_and_fetch('emptyrepo.svndump')
2010-07-14 17:39:14 +04:00
def test_push_dirs(self):
2010-07-14 17:39:14 +04:00
changes = [
# Root files with LF, CRLF and mixed EOL
('lf', 'lf', 'a\nb\n\nc'),
('crlf', 'crlf', 'a\r\nb\r\n\r\nc'),
('mixed', 'mixed', 'a\r\nb\n\r\nc\nd'),
]
self.commitchanges(changes)
self.pushrevisions()
2010-07-14 17:39:14 +04:00
self.assertchanges(changes, self.repo['tip'])
changes = [
# Update all files once, with same EOL
('lf', 'lf', 'a\nb\n\nc\na\nb\n\nc'),
('crlf', 'crlf', 'a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc'),
('mixed', 'mixed', 'a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd'),
]
self.commitchanges(changes)
self.pushrevisions()
2010-07-14 17:39:14 +04:00
self.assertchanges(changes, self.repo['tip'])