OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Unit tests for patch.py.""" | 6 """Unit tests for patch.py.""" |
7 | 7 |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 import unittest | 10 import unittest |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 '+++ b/wtf2\n' | 386 '+++ b/wtf2\n' |
387 '@@ -1,4 +1,4 @@\n' | 387 '@@ -1,4 +1,4 @@\n' |
388 '-#!/usr/bin/env python\n' | 388 '-#!/usr/bin/env python\n' |
389 '+#!/usr/bin/env python1.3\n' | 389 '+#!/usr/bin/env python1.3\n' |
390 ' # Copyright (c) 2010 The Chromium Authors. All rights reserved.\n' | 390 ' # Copyright (c) 2010 The Chromium Authors. All rights reserved.\n' |
391 ' # blah blah blah as\n' | 391 ' # blah blah blah as\n' |
392 ' # found in the LICENSE file.\n') | 392 ' # found in the LICENSE file.\n') |
393 p = patch.FilePatchDiff('wtf2', diff, []) | 393 p = patch.FilePatchDiff('wtf2', diff, []) |
394 self.assertTrue(p) | 394 self.assertTrue(p) |
395 | 395 |
| 396 def testGitExe(self): |
| 397 diff = ( |
| 398 'diff --git a/natsort_test.py b/natsort_test.py\n' |
| 399 'new file mode 100755\n' |
| 400 '--- /dev/null\n' |
| 401 '+++ b/natsort_test.py\n' |
| 402 '@@ -0,0 +1,1 @@\n' |
| 403 '+#!/usr/bin/env python\n') |
| 404 self.assertEquals( |
| 405 [('svn:executable', '*')], |
| 406 patch.FilePatchDiff('natsort_test.py', diff, []).svn_properties) |
| 407 |
396 | 408 |
397 if __name__ == '__main__': | 409 if __name__ == '__main__': |
398 unittest.main() | 410 unittest.main() |
OLD | NEW |