libept
0.5.25
Main Page
Namespaces
Classes
Files
File List
File Members
ept
test.h
Go to the documentation of this file.
1
#include <
ept/core/apt.h
>
2
#include <ept/config.h>
3
#include <
ept/debtags/maint/path.h
>
4
5
#include <wibble/test.h>
6
7
#ifndef EPT_TEST_H
8
#define EPT_TEST_H
9
10
struct
AptTestEnvironment
{
11
ept::core::AptDatabase
db
;
12
AptTestEnvironment
() {
13
pkgInitConfig (*_config);
14
_config->Set(
"Initialized"
, 1);
15
_config->Set(
"Dir"
, TEST_ENV_DIR);
16
_config->Set(
"Dir::Cache"
,
"cache"
);
17
_config->Set(
"Dir::State"
,
"state"
);
18
_config->Set(
"Dir::Etc"
,
"etc"
);
19
_config->Set(
"Dir::State::status"
, TEST_ENV_DIR
"dpkg-status"
);
20
pkgInitSystem (*_config, _system);
21
}
22
};
23
24
struct
DebtagsTestEnvironment
:
AptTestEnvironment
{
25
ept::debtags::Path::OverrideDebtagsSourceDir
odsd
;
26
ept::debtags::Path::OverrideDebtagsIndexDir
odid
;
27
ept::debtags::Path::OverrideDebtagsUserSourceDir
odusd
;
28
ept::debtags::Path::OverrideDebtagsUserIndexDir
oduid
;
29
30
DebtagsTestEnvironment
()
31
:
odsd
( TEST_ENV_DIR
"debtags/"
),
32
odid
( TEST_ENV_DIR
"debtags/"
),
33
odusd
( TEST_ENV_DIR
"debtags/"
),
34
oduid
( TEST_ENV_DIR
"debtags/"
)
35
{}
36
};
37
38
#endif
Generated on Fri Aug 19 2016 02:30:06 for libept by
1.8.1.2