sapling/tests/test-hgsubversion-push-eol.py

40 lines
1.1 KiB
Python
Raw Normal View History

from __future__ import absolute_import
import test_hgsubversion_util
2010-07-14 17:39:14 +04:00
class TestPushEol(test_hgsubversion_util.TestBase):
obsolete_mode_tests = True
stupid_mode_tests = True
2010-07-14 17:39:14 +04:00
def setUp(self):
test_hgsubversion_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"),
]
2010-07-14 17:39:14 +04:00
self.commitchanges(changes)
self.pushrevisions()
self.assertchanges(changes, self.repo["tip"])
2010-07-14 17:39:14 +04:00
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"),
]
2010-07-14 17:39:14 +04:00
self.commitchanges(changes)
self.pushrevisions()
self.assertchanges(changes, self.repo["tip"])
if __name__ == "__main__":
import silenttestrunner
silenttestrunner.main(__name__)