Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba6b288

Browse files
ethomsoncarlosmn
authored andcommitted
revert: correct test that added trailing newline
1 parent 9ff89ea commit ba6b288

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/revert/workdir.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,18 @@ void test_revert_workdir__again_after_edit_two(void)
334334
cl_assert(merge_test_index(repo_index, merge_index_entries, 3));
335335

336336
cl_git_pass(git_futils_readbuffer(&diff_buf, "revert/file.txt"));
337-
cl_assert(strcmp(diff_buf.ptr, "a\n" \
338-
"<<<<<<< HEAD\n" \
339-
"=======\n" \
340-
"a\n" \
341-
">>>>>>> parent of 97e52d5... Revert me\n" \
342-
"a\n" \
343-
"a\n" \
344-
"a\n" \
345-
"a\n" \
346-
"ab\n") == 0);
337+
cl_assert_equal_s(
338+
"a\n" \
339+
"<<<<<<< HEAD\n" \
340+
"=======\n" \
341+
"a\n" \
342+
">>>>>>> parent of 97e52d5... Revert me\n" \
343+
"a\n" \
344+
"a\n" \
345+
"a\n" \
346+
"a\n" \
347+
"ab",
348+
diff_buf.ptr);
347349

348350
git_commit_free(revert_commit);
349351
git_commit_free(head_commit);

0 commit comments

Comments
 (0)