summaryrefslogtreecommitdiff
path: root/tests/libgit2/core
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-09-19 10:39:58 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2023-02-12 21:26:10 +0000
commitacb00e4eae66bfed84046bccb60bf59707fe9626 (patch)
treecb7136b9359e1ba600cc7f24571fcb8a69f6ce0e /tests/libgit2/core
parent4083e46f475cd3026a3c65a1e46c4b73d5c22513 (diff)
downloadlibgit2-acb00e4eae66bfed84046bccb60bf59707fe9626.tar.gz
repo: understand the `objectformat` extension
Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
Diffstat (limited to 'tests/libgit2/core')
-rw-r--r--tests/libgit2/core/opts.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/libgit2/core/opts.c b/tests/libgit2/core/opts.c
index e8f65d510..486ff58c6 100644
--- a/tests/libgit2/core/opts.c
+++ b/tests/libgit2/core/opts.c
@@ -34,8 +34,9 @@ void test_core_opts__extensions_query(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 1);
+ cl_assert_equal_sz(out.count, 2);
cl_assert_equal_s("noop", out.strings[0]);
+ cl_assert_equal_s("objectformat", out.strings[1]);
git_strarray_dispose(&out);
}
@@ -48,9 +49,10 @@ void test_core_opts__extensions_add(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_EXTENSIONS, in, ARRAY_SIZE(in)));
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 2);
+ cl_assert_equal_sz(out.count, 3);
cl_assert_equal_s("noop", out.strings[0]);
- cl_assert_equal_s("foo", out.strings[1]);
+ cl_assert_equal_s("objectformat", out.strings[1]);
+ cl_assert_equal_s("foo", out.strings[2]);
git_strarray_dispose(&out);
}
@@ -63,9 +65,10 @@ void test_core_opts__extensions_remove(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_EXTENSIONS, in, ARRAY_SIZE(in)));
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 2);
- cl_assert_equal_s("bar", out.strings[0]);
- cl_assert_equal_s("baz", out.strings[1]);
+ cl_assert_equal_sz(out.count, 3);
+ cl_assert_equal_s("objectformat", out.strings[0]);
+ cl_assert_equal_s("bar", out.strings[1]);
+ cl_assert_equal_s("baz", out.strings[2]);
git_strarray_dispose(&out);
}