diff options
author | Jonathan Chu <jonathan.chu@me.com> | 2016-03-16 14:08:31 -0400 |
---|---|---|
committer | Jonathan Chu <jonathan.chu@me.com> | 2016-03-16 14:08:31 -0400 |
commit | e328ffddec722be3fba2c9b637378e31e623d58e (patch) | |
tree | 1387978ccf7637eb7a9a2ada62bec1b8a1a62b59 /git/test/test_diff.py | |
parent | 25f27c86af9901f0135eac20a37573469a9c26ef (diff) | |
download | gitpython-e328ffddec722be3fba2c9b637378e31e623d58e.tar.gz |
Add test and fixture for diff index from raw format
This tests the edge case of doing a diff against a single whitespace
filename and returns the proper change type. All other normal usage of
this diff classmethod should remain unchanged.
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r-- | git/test/test_diff.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index 53bb65db..b0d98248 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -122,6 +122,12 @@ class TestDiff(TestBase): dr = res[3] assert dr.diff.endswith(b"+Binary files a/rps and b/rps differ\n") + def test_diff_index_raw_format(self): + output = StringProcessAdapter(fixture('diff_index_raw')) + res = Diff._index_from_raw_format(None, output.stdout) + assert res[0].deleted_file + assert res[0].b_path == '' + 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 |