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

Side by Side Diff: tests/patch_test.py

Issue 7056045: Add support for executables in git-svn patches applied on svn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « patch.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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()
OLDNEW
« no previous file with comments | « patch.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698