#include "../testsuite.h"
+#define TEST_PKG1_PATH "data/beep-1.3-2.ip3.x86_64.pfm"
+
static int test_scan(const struct test* t) {
struct pakfire_repo* repo = NULL;
char baseurl[1024];
return r;
}
+static int test_compose(const struct test* t) {
+ struct pakfire_repo* repo = NULL;
+ int r = EXIT_FAILURE;
+
+ // Create a temporary working directory
+ char* path = test_mkdtemp();
+ ASSERT(path);
+
+ const char* files[] = {
+ TEST_SRC_PATH TEST_PKG1_PATH,
+ NULL,
+ };
+
+ // Compose the repository
+ ASSERT_SUCCESS(
+ pakfire_repo_compose(t->pakfire, path, 0, files)
+ );
+
+ // Everything passed
+ r = EXIT_SUCCESS;
+
+FAIL:
+ if (repo)
+ pakfire_repo_unref(repo);
+
+ return r;
+}
+
int main(int argc, char** argv) {
testsuite_add_test(test_scan);
+ testsuite_add_test(test_compose);
return testsuite_run();
}