]> git.proxmox.com Git - libgit2.git/blobdiff - tests/diff/drivers.c
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / diff / drivers.c
index 42af38a9a44e3577916f8480af60822a74ed2b73..304a54b56dccec34ddf1738a463cb90cb5d01e3e 100644 (file)
@@ -65,7 +65,7 @@ void test_diff_drivers__patterns(void)
        cl_git_pass(git_patch_to_buf(&actual, patch));
        cl_assert_equal_s(expected0, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 
@@ -80,7 +80,7 @@ void test_diff_drivers__patterns(void)
        cl_git_pass(git_patch_to_buf(&actual, patch));
        cl_assert_equal_s(expected1, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 
@@ -95,7 +95,7 @@ void test_diff_drivers__patterns(void)
        cl_git_pass(git_patch_to_buf(&actual, patch));
        cl_assert_equal_s(expected0, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 
@@ -112,7 +112,7 @@ void test_diff_drivers__patterns(void)
        cl_git_pass(git_patch_to_buf(&actual, patch));
        cl_assert_equal_s(expected1, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 
@@ -133,7 +133,7 @@ void test_diff_drivers__patterns(void)
        cl_git_pass(git_patch_to_buf(&actual, patch));
        cl_assert_equal_s(expected2, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 
@@ -169,7 +169,7 @@ void test_diff_drivers__long_lines(void)
 
        cl_assert_equal_s(expected, actual.ptr);
 
-       git_buf_free(&actual);
+       git_buf_dispose(&actual);
        git_patch_free(patch);
        git_diff_free(diff);
 }
@@ -178,7 +178,8 @@ void test_diff_drivers__builtins(void)
 {
        git_diff *diff;
        git_patch *patch;
-       git_buf file = GIT_BUF_INIT, actual = GIT_BUF_INIT, expected = GIT_BUF_INIT;
+       git_str file = GIT_STR_INIT, expected = GIT_STR_INIT;
+       git_buf actual = GIT_BUF_INIT;
        git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
        git_vector files = GIT_VECTOR_INIT;
        size_t i;
@@ -186,7 +187,7 @@ void test_diff_drivers__builtins(void)
 
        g_repo = cl_git_sandbox_init("userdiff");
 
-       cl_git_pass(git_path_dirload(&files, "userdiff/files", 9, 0));
+       cl_git_pass(git_fs_path_dirload(&files, "userdiff/files", 9, 0));
 
        opts.interhunk_lines = 1;
        opts.context_lines = 1;
@@ -205,15 +206,15 @@ void test_diff_drivers__builtins(void)
                cl_git_pass(git_patch_from_diff(&patch, diff, 0));
                cl_git_pass(git_patch_to_buf(&actual, patch));
 
-               git_buf_sets(&expected, "userdiff/expected/nodriver/diff.");
-               git_buf_puts(&expected, extension);
+               git_str_sets(&expected, "userdiff/expected/nodriver/diff.");
+               git_str_puts(&expected, extension);
                cl_git_pass(git_futils_readbuffer(&expected, expected.ptr));
 
                overwrite_filemode(expected.ptr, &actual);
 
                cl_assert_equal_s(expected.ptr, actual.ptr);
 
-               git_buf_clear(&actual);
+               git_buf_dispose(&actual);
                git_patch_free(patch);
                git_diff_free(diff);
 
@@ -230,24 +231,24 @@ void test_diff_drivers__builtins(void)
                cl_git_pass(git_patch_from_diff(&patch, diff, 0));
                cl_git_pass(git_patch_to_buf(&actual, patch));
 
-               git_buf_sets(&expected, "userdiff/expected/driver/diff.");
-               git_buf_puts(&expected, extension);
+               git_str_sets(&expected, "userdiff/expected/driver/diff.");
+               git_str_puts(&expected, extension);
                cl_git_pass(git_futils_readbuffer(&expected, expected.ptr));
 
                overwrite_filemode(expected.ptr, &actual);
 
                cl_assert_equal_s(expected.ptr, actual.ptr);
 
-               git_buf_clear(&actual);
+               git_buf_dispose(&actual);
                git_patch_free(patch);
                git_diff_free(diff);
 
                git__free(path);
        }
 
-       git_buf_free(&file);
-       git_buf_free(&actual);
-       git_buf_free(&expected);
+       git_buf_dispose(&actual);
+       git_str_dispose(&file);
+       git_str_dispose(&expected);
        git_vector_free(&files);
 }