Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2012-08-06 14:53:09 +0400
committerVicent Marti <tanoku@gmail.com>2012-08-06 14:53:09 +0400
commit81f73a872c914fd9fe163a88a7fed48cb0b1027d (patch)
tree92b95f6fdb1e295c23634692d20602cedde97017 /tests-clar/odb
parentd8d28e2ef69bf484639a5f2c5b16ac3007b90e78 (diff)
test: Open ODB on each test suite
Diffstat (limited to 'tests-clar/odb')
-rw-r--r--tests-clar/odb/foreach.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-clar/odb/foreach.c b/tests-clar/odb/foreach.c
index 802935a5c..c1304a2e4 100644
--- a/tests-clar/odb/foreach.c
+++ b/tests-clar/odb/foreach.c
@@ -11,6 +11,9 @@ void test_odb_foreach__cleanup(void)
{
git_odb_free(_odb);
git_repository_free(_repo);
+
+ _odb = NULL;
+ _repo = NULL;
}
static int foreach_cb(git_oid *oid, void *data)
@@ -69,6 +72,9 @@ static int foreach_stop_cb(git_oid *oid, void *data)
void test_odb_foreach__interrupt_foreach(void)
{
nobj = 0;
+ cl_git_pass(git_repository_open(&_repo, cl_fixture("testrepo.git")));
+ git_repository_odb(&_odb, _repo);
+
cl_assert_equal_i(GIT_EUSER, git_odb_foreach(_odb, foreach_stop_cb, NULL));
cl_assert(nobj == 1000);
}