Commit 2014021b201e3af4c5bf132fbf1bce5fb6148e21

Vicent Marti 2011-09-19T05:41:00

Backport t18 fixes to Clay

diff --git a/tests-clay/status/worktree.c b/tests-clay/status/worktree.c
index f8fc3d2..7449c6d 100644
--- a/tests-clay/status/worktree.c
+++ b/tests-clay/status/worktree.c
@@ -17,7 +17,7 @@ cb_status__normal( const char *path, unsigned int status_flags, void *payload)
 {
 	struct status_entry_counts *counts = payload;
 
-	if (counts->entry_count > counts->expected_entry_count) {
+	if (counts->entry_count >= counts->expected_entry_count) {
 		counts->wrong_status_flags_count++;
 		goto exit;
 	}
@@ -106,7 +106,9 @@ void test_status_worktree__whole_repository(void)
 	counts.expected_paths = entry_paths0;
 	counts.expected_statuses = entry_statuses0;
 
-	git_status_foreach(_repository, cb_status__normal, &counts);
+	cl_git_pass(
+		git_status_foreach(_repository, cb_status__normal, &counts)
+	);
 
 	cl_assert(counts.entry_count == counts.expected_entry_count);
 	cl_assert(counts.wrong_status_flags_count == 0);