Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

Issue 2598743002: When importing w3c repos, convert CRLF line endings. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
index f8683ee46b2408dd3c0371c8b337418d0ffa66b0..dcce23323d47dbd2474ae220fa974232b8f51d74 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
@@ -128,6 +128,22 @@ class TestImporterTest(unittest.TestCase):
host.filesystem.executable_files,
set(['/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir/has_shebang.txt']))
+ def test_crlf_line_endings_are_transformed(self):
+ host = MockHost()
+ host.filesystem = MockFileSystem(files={
+ '/blink/w3c/dir/binary.x': '\x81\x05\r\nX\x00\x001\x81\x05\r\n\x00',
+ '/blink/w3c/dir/dos.txt': 'xxx\r\nyyy\r\n',
+ '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
+ })
+ importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, self.options())
+ importer.do_import()
+ self.assertEqual(
+ host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir/dos.txt'],
+ 'xxx\nyyy\n')
+ self.assertEqual(
+ host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/w3c/blink/w3c/dir/binary.x'],
+ '\x81\x05\r\nX\x00\x001\x81\x05\r\n\x00')
+
def test_ref_test_with_ref_is_copied(self):
host = MockHost()
host.filesystem = MockFileSystem(files={
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698