Go to the documentation of this file.00001 #include <ept/core/apt.h>
00002 #include <ept/config.h>
00003 #include <ept/debtags/maint/path.h>
00004
00005 #include <wibble/test.h>
00006
00007 #ifndef EPT_TEST_H
00008 #define EPT_TEST_H
00009
00010 struct AptTestEnvironment {
00011 ept::core::AptDatabase db;
00012 AptTestEnvironment() {
00013 pkgInitConfig (*_config);
00014 _config->Set("Initialized", 1);
00015 _config->Set("Dir", TEST_ENV_DIR);
00016 _config->Set("Dir::Cache", "cache");
00017 _config->Set("Dir::State", "state");
00018 _config->Set("Dir::Etc", "etc");
00019 _config->Set("Dir::State::status", TEST_ENV_DIR "dpkg-status");
00020 pkgInitSystem (*_config, _system);
00021 }
00022 };
00023
00024 struct DebtagsTestEnvironment : AptTestEnvironment {
00025 ept::debtags::Path::OverrideDebtagsSourceDir odsd;
00026 ept::debtags::Path::OverrideDebtagsIndexDir odid;
00027 ept::debtags::Path::OverrideDebtagsUserSourceDir odusd;
00028 ept::debtags::Path::OverrideDebtagsUserIndexDir oduid;
00029
00030 DebtagsTestEnvironment()
00031 : odsd( TEST_ENV_DIR "debtags/"),
00032 odid( TEST_ENV_DIR "debtags/"),
00033 odusd( TEST_ENV_DIR "debtags/"),
00034 oduid( TEST_ENV_DIR "debtags/")
00035 {}
00036 };
00037
00038 #endif