NULL,
};
+static const char* more_relations[] = {
+ // Dependencies with excess space
+ "pkgconfig(blah) ",
+ "pkgconfig(glib-2.0) ",
+ "kernel ",
+ " kernel",
+ "kernel >= 1 ",
+ " kernel >= 1",
+
+ NULL,
+};
+
static int test_dependencies(const struct test* t) {
Id dep = 0;
const char* result = NULL;
ASSERT(dep == ID_NULL);
}
+ // Check some more relations without comparing the result
+ for (const char** relation = more_relations; *relation; relation++) {
+ printf("Parsing '%s'...\n", *relation);
+
+ // Parse relation
+ ASSERT(dep = pakfire_str2dep(t->pakfire, *relation));
+
+ // Convert it back to string
+ ASSERT(result = pakfire_dep2str(t->pakfire, dep));
+
+ printf(" as '%s'\n", result);
+ }
+
return EXIT_SUCCESS;
FAIL: