summaryrefslogtreecommitdiff
path: root/libappstream-builder/asb-self-test.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-01-30 13:04:33 +0000
committerRichard Hughes <richard@hughsie.com>2015-01-30 13:17:04 +0000
commitdcb77b98fb5bf6eb13bf2688fd6a818634a2026a (patch)
tree3e6f4794267b71f3c9b9cc71ee787d88b17eaaad /libappstream-builder/asb-self-test.c
parent14db05d4f8b0167a592733e10264a3eb5b1c6165 (diff)
downloadappstream-glib-dcb77b98fb5bf6eb13bf2688fd6a818634a2026a.tar.gz
Add the extra child deps to the main package
This means if X depends on X-libs, and X-libs depends on GTK-3, then X should have the modern toolkit kudo. This means switching around the API a bit so that we can add deps after the AsbPackage has been created.
Diffstat (limited to 'libappstream-builder/asb-self-test.c')
-rw-r--r--libappstream-builder/asb-self-test.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/libappstream-builder/asb-self-test.c b/libappstream-builder/asb-self-test.c
index 546d257..6145e87 100644
--- a/libappstream-builder/asb-self-test.c
+++ b/libappstream-builder/asb-self-test.c
@@ -86,6 +86,7 @@ asb_test_package_rpm_func (void)
{
AsRelease *rel;
GError *error = NULL;
+ GPtrArray *deps;
GPtrArray *releases;
gboolean ret;
gchar *tmp;
@@ -129,9 +130,11 @@ asb_test_package_rpm_func (void)
g_free (tmp);
/* deps */
- tmp = g_strjoinv (";", asb_package_get_deps (pkg));
- g_assert_cmpstr (tmp, ==, "bar;baz;foo");
- g_free (tmp);
+ deps = asb_package_get_deps (pkg);
+ g_assert_cmpint (deps->len, ==, 3);
+ g_assert_cmpstr (g_ptr_array_index (deps, 0), ==, "bar");
+ g_assert_cmpstr (g_ptr_array_index (deps, 1), ==, "baz");
+ g_assert_cmpstr (g_ptr_array_index (deps, 2), ==, "foo");
/* releases */
releases = asb_package_get_releases (pkg);
@@ -403,6 +406,9 @@ asb_test_context_test_func (AsbTestContextMode mode)
"<source_pkgname>app</source_pkgname>\n"
"<name>Extra</name>\n"
"<summary>Addons for extra functionality</summary>\n"
+ "<kudos>\n"
+ "<kudo>ModernToolkit</kudo>\n"
+ "</kudos>\n"
"<project_license>GPL-2.0+</project_license>\n"
"<url type=\"homepage\">http://people.freedesktop.org/</url>\n"
"<extends>app.desktop</extends>\n"
@@ -599,6 +605,9 @@ asb_test_context_test_func (AsbTestContextMode mode)
"<categories>\n"
"<category>ConsoleOnly</category>\n"
"</categories>\n"
+ "<kudos>\n"
+ "<kudo>ModernToolkit</kudo>\n"
+ "</kudos>\n"
"<vetos>\n"
"<veto>Required AppData: ConsoleOnly</veto>\n"
"</vetos>\n"
@@ -626,6 +635,9 @@ asb_test_context_test_func (AsbTestContextMode mode)
"<categories>\n"
"<category>ConsoleOnly</category>\n"
"</categories>\n"
+ "<kudos>\n"
+ "<kudo>ModernToolkit</kudo>\n"
+ "</kudos>\n"
"<vetos>\n"
"<veto>Required AppData: ConsoleOnly</veto>\n"
"</vetos>\n"