[gnome-software] trivial: Add a test where a local pkgname is matched in AppStream



commit 18575f6b2de30fe34202098968bf3b380c9fbf1e
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jun 27 11:21:09 2016 +0100

    trivial: Add a test where a local pkgname is matched in AppStream

 src/gs-self-test.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 1042127..f02fd2f 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -533,7 +533,7 @@ gs_plugin_loader_dpkg_func (GsPluginLoader *plugin_loader)
                                            &error);
        g_assert_no_error (error);
        g_assert (app != NULL);
-       g_assert_cmpstr (gs_app_get_id (app), ==, NULL);
+       g_assert_cmpstr (gs_app_get_id (app), ==, "chiron.desktop");
        g_assert_cmpstr (gs_app_get_source_default (app), ==, "chiron");
        g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==, "http://127.0.0.1/";);
        g_assert_cmpstr (gs_app_get_name (app), ==, "chiron");
@@ -568,7 +568,7 @@ gs_plugin_loader_packagekit_local_func (GsPluginLoader *plugin_loader)
                                            &error);
        g_assert_no_error (error);
        g_assert (app != NULL);
-       g_assert_cmpstr (gs_app_get_id (app), ==, NULL);
+       g_assert_cmpstr (gs_app_get_id (app), ==, "chiron.desktop");
        g_assert_cmpstr (gs_app_get_source_default (app), ==, "chiron");
        g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==, "http://127.0.0.1/";);
        g_assert_cmpstr (gs_app_get_name (app), ==, "chiron");
@@ -945,6 +945,10 @@ main (int argc, char **argv)
        xml = g_strdup_printf ("<?xml version=\"1.0\"?>\n"
                "<components version=\"0.9\">\n"
                "  <component type=\"desktop\">\n"
+               "    <id>chiron.desktop</id>\n"
+               "    <pkgname>chiron</pkgname>\n"
+               "  </component>\n"
+               "  <component type=\"desktop\">\n"
                "    <id>zeus.desktop</id>\n"
                "    <name>Zeus</name>\n"
                "    <summary>A teaching application</summary>\n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]