From 1194dc4322e15a816bfa7731a9487f67ba1a02aa Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 24 Nov 2009 11:56:55 +0100 Subject: diff: Added additional assertion to test: paths not in the index should not trigger an error --- test/git/test_diff.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/git/test_diff.py') diff --git a/test/git/test_diff.py b/test/git/test_diff.py index 9335aced..e559e62d 100644 --- a/test/git/test_diff.py +++ b/test/git/test_diff.py @@ -79,4 +79,11 @@ class TestDiff(TestBase): for key,value in assertion_map.items(): assert value, "Did not find diff for %s" % key # END for each iteration type + + # test path not existing in the index - should be ignored + c = self.rorepo.head.commit + cp = c.parents[0] + diff_index = c.diff(cp, ["does/not/exist"]) + assert len(diff_index) == 0 + -- cgit v1.2.1