[packagechooser] CHeck that AppData load was succesful

This commit is contained in:
Adriaan de Groot 2019-08-06 15:45:14 +02:00
parent fb547364c7
commit 9a8b2c5a1e

View File

@ -52,6 +52,13 @@ PackageChooserTests::testAppData()
PackageItem p = PackageItem::fromAppData( appdataName );
#ifdef HAVE_XML
QVERIFY( p.isValid() );
QCOMPARE( p.id, "io.calamares.calamares.desktop" );
QCOMPARE( p.name.get(), "Calamares" );
// The <description> entry has precedence
QCOMPARE( p.description.get(), "Calamares is an installer program for Linux distributions." );
// .. but en_GB doesn't have an entry in description, so uses <summary>
QCOMPARE( p.description.get( QLocale( "en_GB" ) ), "Calamares Linux Installer" );
QCOMPARE( p.description.get( QLocale( "nl" ) ), "Calamares is een installatieprogramma voor Linux distributies." );
#else
QVERIFY( !p.isValid() );
#endif