File: inmemory.c

package info (click to toggle)
libgit2 0.25.1%2Breally0.24.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 28,512 kB
  • ctags: 15,888
  • sloc: ansic: 153,520; sh: 297; python: 175; makefile: 70; php: 65
file content (22 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "clar_libgit2.h"

void test_index_inmemory__can_create_an_inmemory_index(void)
{
	git_index *index;

	cl_git_pass(git_index_new(&index));
	cl_assert_equal_i(0, (int)git_index_entrycount(index));

	git_index_free(index);
}

void test_index_inmemory__cannot_add_bypath_to_an_inmemory_index(void)
{
	git_index *index;

	cl_git_pass(git_index_new(&index));

	cl_assert_equal_i(GIT_ERROR, git_index_add_bypath(index, "test.txt"));

	git_index_free(index);
}