sapling/tests/test-hgsubversion-push-eol.py
Kostia Balytskyi 3cc5c5756c hgsubversion: move tests to the general tests dir
Summary:
Move tests to where we are used to them.

Note that I don't move comprehensive tests to the `tests` directory, since
I think that having them not run when `./run-tests.py` is run without arguments
may be a useful thing. In general, we may adopt this concept for the core as well.
If we decide we do want to move them, it's very easy to do.

Depends on D6719879

Test Plan: - fixups and test runs follow in the stack

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6719883
2018-01-17 03:23:44 -08:00

31 lines
1008 B
Python

import test_util
class TestPushEol(test_util.TestBase):
obsolete_mode_tests = True
stupid_mode_tests = True
def setUp(self):
test_util.TestBase.setUp(self)
self._load_fixture_and_fetch('emptyrepo.svndump')
def test_push_dirs(self):
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()
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()
self.assertchanges(changes, self.repo['tip'])