summaryrefslogtreecommitdiff
path: root/git/test/test_diff.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r--git/test/test_diff.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py
index c5183089..ce0f64f2 100644
--- a/git/test/test_diff.py
+++ b/git/test/test_diff.py
@@ -56,6 +56,15 @@ class TestDiff(TestBase):
assert_equal(diff.rename_from, 'AUTHORS')
assert_equal(diff.rename_to, 'CONTRIBUTORS')
+ output = StringProcessAdapter(fixture('diff_rename_raw'))
+ diffs = Diff._index_from_raw_format(self.rorepo, output.stdout)
+ assert len(diffs) == 1
+ diff = diffs[0]
+ assert diff.renamed
+ assert diff.rename_from == 'this'
+ assert diff.rename_to == 'that'
+ assert len(list(diffs.iter_change_type('R'))) == 1
+
def test_diff_patch_format(self):
# test all of the 'old' format diffs for completness - it should at least
# be able to deal with it