#include <uuid/uuid.h>
#include <pakfire/package.h>
+#include <pakfire/string.h>
#include <pakfire/util.h>
#include "../testsuite.h"
*/
static int test_create(const struct test* t) {
struct pakfire_package* pkg = NULL;
+ char** groups = NULL;
int r = EXIT_FAILURE;
ASSERT_SUCCESS(pakfire_package_create(&pkg, t->pakfire, NULL, "test", "1.0-1", "x86_64"));
// Groups
ASSERT_SUCCESS(pakfire_package_set_string(pkg, PAKFIRE_PKG_GROUPS, "GROUPS"));
- ASSERT_STRING_EQUALS(pakfire_package_get_string(pkg, PAKFIRE_PKG_GROUPS), "GROUPS");
+
+ groups = pakfire_package_get_strings(pkg, PAKFIRE_PKG_GROUPS);
+ ASSERT(groups && *groups);
+ ASSERT_STRING_EQUALS(groups[0], "GROUPS"); ASSERT(groups[1] == NULL);
// Vendor
ASSERT_SUCCESS(pakfire_package_set_string(pkg, PAKFIRE_PKG_VENDOR, "VENDOR"));
FAIL:
if (pkg)
pakfire_package_unref(pkg);
+ if (groups)
+ pakfire_strings_free(groups);
return r;
}