| Index: tests/patch_test.py
|
| diff --git a/tests/patch_test.py b/tests/patch_test.py
|
| index 6aa7cd17be65808b075bf697d8e75bb5caf09526..5a442d07fecc47096ee06ee6b436f60829b6ffa3 100755
|
| --- a/tests/patch_test.py
|
| +++ b/tests/patch_test.py
|
| @@ -32,7 +32,6 @@ class PatchTest(unittest.TestCase):
|
| patchlevel=0,
|
| svn_properties=None,
|
| nb_hunks=None):
|
| - svn_properties = svn_properties or []
|
| self.assertEquals(p.filename, filename)
|
| self.assertEquals(p.source_filename, source_filename)
|
| self.assertEquals(p.is_binary, is_binary)
|
| @@ -51,6 +50,8 @@ class PatchTest(unittest.TestCase):
|
| self.assertEquals(len(p.hunks), nb_hunks)
|
| else:
|
| self.assertEquals(None, nb_hunks)
|
| + if hasattr(p, 'svn_properties'):
|
| + self.assertEquals(p.svn_properties, svn_properties or [])
|
|
|
| def testFilePatchDelete(self):
|
| p = patch.FilePatchDelete('foo', False)
|
| @@ -89,6 +90,14 @@ class PatchTest(unittest.TestCase):
|
| p, 'git_cl/git-cl', GIT.MODE_EXE_JUNK, is_git_diff=True, patchlevel=1,
|
| svn_properties=[('svn:executable', '*')], nb_hunks=0)
|
|
|
| + def testFilePatchDiffHeaderNotExecutable(self):
|
| + p = patch.FilePatchDiff(
|
| + 'build/android/ant/create.js', GIT.NEW_NOT_EXECUTABLE, [])
|
| + self._check_patch(
|
| + p, 'build/android/ant/create.js', GIT.NEW_NOT_EXECUTABLE,
|
| + is_git_diff=True, patchlevel=1, is_new=True,
|
| + nb_hunks=1)
|
| +
|
| def testFilePatchDiffSvnNew(self):
|
| # The code path is different for git and svn.
|
| p = patch.FilePatchDiff('foo', RAW.NEW, [])
|
|
|