Update tests for new API.
This commit is contained in:
parent
2a21354a1c
commit
152212a9ab
@ -72,9 +72,13 @@ ATF_TC_BODY(find_pkg_obsoletes_test, tc)
|
||||
struct xbps_handle xh;
|
||||
xbps_array_t res;
|
||||
xbps_dictionary_t d1, d2;
|
||||
const char *tcsdir;
|
||||
|
||||
/* get test source dir */
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = "/tmp";
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
xh.conffile = "/tmp/unexistent.conf";
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
|
@ -62,8 +62,8 @@ ATF_TC_BODY(find_pkg_orphans_test, tc)
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = tcsdir;
|
||||
xh.metadir = tcsdir;
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
strncpy(xh.metadir, tcsdir, sizeof(xh.metadir));
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
a = xbps_array_create();
|
||||
@ -99,8 +99,8 @@ ATF_TC_BODY(find_all_orphans_test, tc)
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = tcsdir;
|
||||
xh.metadir = tcsdir;
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
strncpy(xh.metadir, tcsdir, sizeof(xh.metadir));
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
pstr = xbps_string_create();
|
||||
|
@ -42,8 +42,8 @@ ATF_TC_BODY(pkgdb_get_pkg_test, tc)
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = tcsdir;
|
||||
xh.metadir = tcsdir;
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
strncpy(xh.metadir, tcsdir, sizeof(xh.metadir));
|
||||
xh.flags = XBPS_FLAG_DEBUG;
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
@ -84,8 +84,8 @@ ATF_TC_BODY(pkgdb_get_virtualpkg_test, tc)
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = tcsdir;
|
||||
xh.metadir = tcsdir;
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
strncpy(xh.metadir, tcsdir, sizeof(xh.metadir));
|
||||
xh.flags = XBPS_FLAG_DEBUG;
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
@ -129,8 +129,8 @@ ATF_TC_BODY(pkgdb_get_pkg_revdeps_test, tc)
|
||||
tcsdir = atf_tc_get_config_var(tc, "srcdir");
|
||||
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
xh.rootdir = tcsdir;
|
||||
xh.metadir = tcsdir;
|
||||
strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir));
|
||||
strncpy(xh.metadir, tcsdir, sizeof(xh.metadir));
|
||||
xh.flags = XBPS_FLAG_DEBUG;
|
||||
ATF_REQUIRE_EQ(xbps_init(&xh), 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user