summaryrefslogtreecommitdiff
path: root/tests-clar/diff/iterator.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-10-15 12:48:43 -0700
committerRussell Belfer <rb@github.com>2012-10-15 12:54:46 -0700
commit52032ae53689ac37350f6af3bf1834122e4b3cf0 (patch)
treed9d98e14fa8e2a5d5d024dbd623bf9beb42e1330 /tests-clar/diff/iterator.c
parentd5a51910678f8aea2b7efe077efc678141762dfc (diff)
downloadlibgit2-52032ae53689ac37350f6af3bf1834122e4b3cf0.tar.gz
Fix single-file ignore checks
To answer if a single given file should be ignored, the path to that file has to be processed progressively checking that there are no intermediate ignored directories in getting to the file in question. This enables that, fixing the broken old behavior, and adds tests to exercise various ignore situations.
Diffstat (limited to 'tests-clar/diff/iterator.c')
-rw-r--r--tests-clar/diff/iterator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/diff/iterator.c b/tests-clar/diff/iterator.c
index c27d3fa6c..cca6450d2 100644
--- a/tests-clar/diff/iterator.c
+++ b/tests-clar/diff/iterator.c
@@ -451,13 +451,13 @@ static void workdir_iterator_test(
git_iterator_free(i);
- cl_assert(count == expected_count);
- cl_assert(count_all == expected_count + expected_ignores);
+ cl_assert_equal_i(expected_count,count);
+ cl_assert_equal_i(expected_count + expected_ignores, count_all);
}
void test_diff_iterator__workdir_0(void)
{
- workdir_iterator_test("attr", NULL, NULL, 25, 2, NULL, "ign");
+ workdir_iterator_test("attr", NULL, NULL, 27, 1, NULL, "ign");
}
static const char *status_paths[] = {