File: testmetadataconversion.cpp

package info (click to toggle)
krunner 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 828 kB
  • sloc: cpp: 4,954; sh: 46; xml: 25; python: 23; makefile: 7
file content (26 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
    SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de>
    SPDX-License-Identifier: LGPL-2.1-or-later
*/

#include "kpluginmetadata_utils_p.h"
#include <QTest>

class TestMetaDataConversion : public QObject
{
    Q_OBJECT

private Q_SLOTS:
    void testMetaDataConversion()
    {
        const KPluginMetaData data = parseMetaDataFromDesktopFile(QFINDTESTDATA("plasma-runner-testconversionfile.desktop"));
        QVERIFY(data.isValid());
        QCOMPARE(data.pluginId(), "testconversionfile");
        QCOMPARE(data.name(), "DBus runner test");
        QCOMPARE(data.description(), "Some Comment");
    }
};

QTEST_MAIN(TestMetaDataConversion)

#include "testmetadataconversion.moc"