mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-02 12:29:08 +00:00
opts: Some basic tests
This commit is contained in:
parent
a0f777c87f
commit
0d52cb4aea
18
tests-clar/core/opts.c
Normal file
18
tests-clar/core/opts.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include "clar_libgit2.h"
|
||||
|
||||
void test_core_opts__readwrite(void)
|
||||
{
|
||||
size_t old_val = 0;
|
||||
size_t new_val = 0;
|
||||
|
||||
git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &old_val);
|
||||
git_libgit2_opts(GIT_OPT_SET_MWINDOW_SIZE, (size_t)1234);
|
||||
git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &new_val);
|
||||
|
||||
cl_assert(new_val == 1234);
|
||||
|
||||
git_libgit2_opts(GIT_OPT_SET_MWINDOW_SIZE, old_val);
|
||||
git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &new_val);
|
||||
|
||||
cl_assert(new_val == old_val);
|
||||
}
|
Loading…
Reference in New Issue
Block a user