| OLD | NEW |
| 1 # Copyright (C) 2009 Google Inc. All rights reserved. | 1 # Copyright (C) 2009 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 self.assertEqual((86, 89), diff.lines[21][0:2]) | 74 self.assertEqual((86, 89), diff.lines[21][0:2]) |
| 75 self.assertEqual((87, 90), diff.lines[22][0:2]) | 75 self.assertEqual((87, 90), diff.lines[22][0:2]) |
| 76 | 76 |
| 77 # Check if a newly added file is correctly handled. | 77 # Check if a newly added file is correctly handled. |
| 78 diff = parser.files['LayoutTests/platform/mac/fast/flexbox/box-orient-bu
tton-expected.checksum'] | 78 diff = parser.files['LayoutTests/platform/mac/fast/flexbox/box-orient-bu
tton-expected.checksum'] |
| 79 self.assertEqual(1, len(diff.lines)) | 79 self.assertEqual(1, len(diff.lines)) |
| 80 self.assertEqual((0, 1), diff.lines[0][0:2]) | 80 self.assertEqual((0, 1), diff.lines[0][0:2]) |
| 81 | 81 |
| 82 def test_diff_converter(self): | 82 def test_diff_converter(self): |
| 83 comment_lines = [ | 83 comment_lines = [ |
| 84 "Hey guys,\n", | 84 "Hey people,\n", |
| 85 "\n", | 85 "\n", |
| 86 "See my awesome patch below!\n", | 86 "See my awesome patch below!\n", |
| 87 "\n", | 87 "\n", |
| 88 " - Cool Hacker\n", | 88 " - Cool Hacker\n", |
| 89 "\n", | 89 "\n", |
| 90 ] | 90 ] |
| 91 | 91 |
| 92 revision_lines = [ | 92 revision_lines = [ |
| 93 "Subversion Revision 289799\n", | 93 "Subversion Revision 289799\n", |
| 94 ] | 94 ] |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 A | 168 A |
| 169 B | 169 B |
| 170 C | 170 C |
| 171 +D | 171 +D |
| 172 E | 172 E |
| 173 F | 173 F |
| 174 """) | 174 """) |
| 175 | 175 |
| 176 self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_di
ff(x) for x in shortfmt.readlines())) | 176 self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_di
ff(x) for x in shortfmt.readlines())) |
| 177 self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_di
ff(x) for x in inputfmt.readlines())) | 177 self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_di
ff(x) for x in inputfmt.readlines())) |
| OLD | NEW |