Add orig & final commit test.

This commit is contained in:
XTao 2014-01-09 11:18:38 +08:00
parent a06474f81d
commit b92b434f5a

View File

@ -48,6 +48,9 @@ void check_blame_hunk_index(git_repository *repo, git_blame *blame, int idx,
actual, expected); actual, expected);
} }
cl_assert_equal_s(actual, expected); cl_assert_equal_s(actual, expected);
cl_assert_equal_i(git_oid_cmp(&hunk->final_commit_id, &hunk->orig_commit_id), 0);
if (strcmp(hunk->orig_path, orig_path)) { if (strcmp(hunk->orig_path, orig_path)) {
hunk_message(idx, hunk, "has mismatched original path (got '%s', expected '%s')\n", hunk_message(idx, hunk, "has mismatched original path (got '%s', expected '%s')\n",
hunk->orig_path, orig_path); hunk->orig_path, orig_path);