Commit 8f0d5cdef9e2cb53c2f455d0a449f25c87647811

Edward Thomson 2016-12-29T12:55:49

tests: update error message checking

diff --git a/tests/fetchhead/nonetwork.c b/tests/fetchhead/nonetwork.c
index 3b750af..ea4b70e 100644
--- a/tests/fetchhead/nonetwork.c
+++ b/tests/fetchhead/nonetwork.c
@@ -293,7 +293,7 @@ void test_fetchhead_nonetwork__invalid_for_merge(void)
 	cl_git_rewritefile("./test1/.git/FETCH_HEAD", "49322bb17d3acc9146f98c97d078513228bbf3c0\tinvalid-merge\t\n");
 	cl_git_fail(git_repository_fetchhead_foreach(g_repo, read_noop, NULL));
 
-	cl_assert(git__prefixcmp(giterr_last()->message, "Invalid for-merge") == 0);
+	cl_assert(git__prefixcmp(giterr_last()->message, "invalid for-merge") == 0);
 }
 
 void test_fetchhead_nonetwork__invalid_description(void)
@@ -304,7 +304,7 @@ void test_fetchhead_nonetwork__invalid_description(void)
 	cl_git_rewritefile("./test1/.git/FETCH_HEAD", "49322bb17d3acc9146f98c97d078513228bbf3c0\tnot-for-merge\n");
 	cl_git_fail(git_repository_fetchhead_foreach(g_repo, read_noop, NULL));
 
-	cl_assert(git__prefixcmp(giterr_last()->message, "Invalid description") == 0);
+	cl_assert(git__prefixcmp(giterr_last()->message, "invalid description") == 0);
 }
 
 static int assert_master_for_merge(const char *ref, const char *url, const git_oid *id, unsigned int is_merge, void *data)
diff --git a/tests/odb/backend/nobackend.c b/tests/odb/backend/nobackend.c
index 783641e..3c4f344 100644
--- a/tests/odb/backend/nobackend.c
+++ b/tests/odb/backend/nobackend.c
@@ -40,7 +40,7 @@ void test_odb_backend_nobackend__write_fails_gracefully(void)
 	cl_git_fail(git_odb_write(&id, odb, "Hello world!\n", 13, GIT_OBJ_BLOB));
 
 	err = giterr_last();
-	cl_assert_equal_s(err->message, "Cannot write object - unsupported in the loaded odb backends");
+	cl_assert_equal_s(err->message, "cannot write object - unsupported in the loaded odb backends");
 
 	git_odb_free(odb);
 }
diff --git a/tests/refs/branches/upstream.c b/tests/refs/branches/upstream.c
index 8f2e7a2..82f5665 100644
--- a/tests/refs/branches/upstream.c
+++ b/tests/refs/branches/upstream.c
@@ -175,7 +175,7 @@ void test_refs_branches_upstream__no_fetch_refspec(void)
 	cl_git_pass(git_reference_lookup(&branch, repo, "refs/heads/test"));
 	cl_git_pass(git_reference_create(&ref, repo, "refs/remotes/matching/master", git_reference_target(branch), 1, "fetch"));
 	cl_git_fail(git_branch_set_upstream(branch, "matching/master"));
-	cl_assert_equal_s("Could not determine remote for 'refs/remotes/matching/master'",
+	cl_assert_equal_s("could not determine remote for 'refs/remotes/matching/master'",
 			  giterr_last()->message);
 
 	/* we can't set it automatically, so let's test the user setting it by hand */
diff --git a/tests/refs/reflog/reflog.c b/tests/refs/reflog/reflog.c
index fdb1550..9e46c8a 100644
--- a/tests/refs/reflog/reflog.c
+++ b/tests/refs/reflog/reflog.c
@@ -261,7 +261,7 @@ void test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error
 	error = giterr_last();
 
 	cl_assert(error != NULL);
-	cl_assert_equal_s("Unable to parse OID - contains invalid characters", error->message);
+	cl_assert_equal_s("unable to parse OID - contains invalid characters", error->message);
 
 	git_reference_free(ref);
 	git_buf_free(&logpath);