]> git.proxmox.com Git - libgit2.git/commitdiff
revert: correct test that added trailing newline
authorEdward Thomson <ethomson@edwardthomson.com>
Tue, 7 Jul 2015 21:46:20 +0000 (16:46 -0500)
committerEdward Thomson <ethomson@edwardthomson.com>
Tue, 7 Jul 2015 22:01:49 +0000 (17:01 -0500)
tests/revert/workdir.c

index 7ccf0f937da2bfdef418e906e858e4548f340420..9f83bd8424b8d9a50c6e5d1f8f5bdbb795c18e0f 100644 (file)
@@ -334,16 +334,18 @@ void test_revert_workdir__again_after_edit_two(void)
        cl_assert(merge_test_index(repo_index, merge_index_entries, 3));
 
        cl_git_pass(git_futils_readbuffer(&diff_buf, "revert/file.txt"));
-       cl_assert(strcmp(diff_buf.ptr,  "a\n" \
-               "<<<<<<< HEAD\n" \
-               "=======\n" \
-               "a\n" \
-               ">>>>>>> parent of 97e52d5... Revert me\n" \
-               "a\n" \
-               "a\n" \
-               "a\n" \
-               "a\n" \
-               "ab\n") == 0);
+       cl_assert_equal_s(
+                       "a\n" \
+                       "<<<<<<< HEAD\n" \
+                       "=======\n" \
+                       "a\n" \
+                       ">>>>>>> parent of 97e52d5... Revert me\n" \
+                       "a\n" \
+                       "a\n" \
+                       "a\n" \
+                       "a\n" \
+                       "ab",
+               diff_buf.ptr);
 
        git_commit_free(revert_commit);
        git_commit_free(head_commit);