Commit c5d4317887da470c54174ae1248c527662c5a8a1

Carlos Martín Nieto 2015-07-27T13:31:06

iterator: adjust unreadable-dir test to new behaviour We don't want the iterator to make us stop whenever we hit an unreadable dir. We should instead move over to the next item.

diff --git a/tests/repo/iterator.c b/tests/repo/iterator.c
index 26e8954..bb2d3a1 100644
--- a/tests/repo/iterator.c
+++ b/tests/repo/iterator.c
@@ -928,7 +928,7 @@ void test_repo_iterator__fs2(void)
 	git_iterator_free(i);
 }
 
-void test_repo_iterator__fs_preserves_error(void)
+void test_repo_iterator__unreadable_dir(void)
 {
 	git_iterator *i;
 	const git_index_entry *e;
@@ -951,10 +951,6 @@ void test_repo_iterator__fs_preserves_error(void)
 
 	cl_git_pass(git_iterator_advance(&e, i)); /* a */
 	cl_git_fail(git_iterator_advance(&e, i)); /* b */
-	cl_assert(giterr_last());
-	cl_assert(giterr_last()->message != NULL);
-	/* skip 'c/' empty directory */
-	cl_git_pass(git_iterator_advance(&e, i)); /* d */
 	cl_assert_equal_i(GIT_ITEROVER, git_iterator_advance(&e, i));
 
 	cl_must_pass(p_chmod("empty_standard_repo/r/b", 0777));