mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
5a73bf5843
Summary: This migration allows `./run-tests.py` to run `hgsubversion` tests. Since hgsubversion tests are actually python unittests, we don't care about their output at all, they fail differently. But the behavior of the test suite require us to match whatever the tests prints. We do this later in the stack. Depends on D6719886 Test Plan: - check that tests are runnable at least Reviewers: #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D6719890
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
import test_hgsubversion_util
|
|
|
|
class TestPushEol(test_hgsubversion_util.TestBase):
|
|
obsolete_mode_tests = True
|
|
stupid_mode_tests = True
|
|
|
|
def setUp(self):
|
|
test_hgsubversion_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'])
|
|
|
|
if __name__ == '__main__':
|
|
import silenttestrunner
|
|
silenttestrunner.main(__name__)
|
|
|