34 a = xbps_array_create();
35 ATF_REQUIRE(a != NULL);
37 xbps_array_add_cstring_nocopy(a,
"cron-daemon>=0");
38 xbps_array_add_cstring_nocopy(a,
"xbps>=0.14");
48 a = xbps_array_create();
49 ATF_REQUIRE(a != NULL);
51 xbps_array_add_cstring_nocopy(a,
"cron-daemon-0_1");
52 xbps_array_add_cstring_nocopy(a,
"xbps-9999_1");
57static xbps_dictionary_t
63 d = xbps_dictionary_create();
64 ATF_REQUIRE(d != NULL);
67 ATF_REQUIRE_EQ(xbps_dictionary_set(d,
"provides", a),
true);
72ATF_TC(match_virtual_pkg_dict_test);
73ATF_TC_HEAD(match_virtual_pkg_dict_test, tc)
75 atf_tc_set_md_var(tc,
"descr",
"Test xbps_match_virtual_pkg_in_dict");
78ATF_TC_BODY(match_virtual_pkg_dict_test, tc)
88ATF_TC(match_any_virtualpkg_rundeps_test);
89ATF_TC_HEAD(match_any_virtualpkg_rundeps_test, tc)
91 atf_tc_set_md_var(tc,
"descr",
"Test xbps_match_any_virtualpkg_in_rundeps");
94ATF_TC_BODY(match_any_virtualpkg_rundeps_test, tc)
96 xbps_array_t provides, rundeps;
98 provides = provides_init();
99 rundeps = rundeps_init();
107 ATF_TP_ADD_TC(tp, match_virtual_pkg_dict_test);
108 ATF_TP_ADD_TC(tp, match_any_virtualpkg_rundeps_test);
110 return atf_no_error();
bool xbps_match_virtual_pkg_in_dict(xbps_dictionary_t pkgd, const char *str)
bool xbps_match_any_virtualpkg_in_rundeps(xbps_array_t rundeps, xbps_array_t provides)