diff options
author | Sune Vuorela <sune@vuorela.dk> | 2015-06-15 20:03:54 +0200 |
---|---|---|
committer | Sune Vuorela <sune@vuorela.dk> | 2015-06-15 20:03:54 +0200 |
commit | a5bb0860caf443cb89a7d4b67a040485e7509e74 (patch) | |
tree | fe5c571ec9236f556aee5eb976f3b748ef3f5dbc /autotests/ksharedconfigtest.cpp | |
parent | 5c1a50b7917bc901ff8f04f93b33215d787e7b64 (diff) | |
download | kconfig-a5bb0860caf443cb89a7d4b67a040485e7509e74.tar.gz kconfig-a5bb0860caf443cb89a7d4b67a040485e7509e74.tar.bz2 |
Unittest of reading config data from qt resource
REVIEW: 124098
Diffstat (limited to 'autotests/ksharedconfigtest.cpp')
-rw-r--r-- | autotests/ksharedconfigtest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/autotests/ksharedconfigtest.cpp b/autotests/ksharedconfigtest.cpp index c22623b4..ae3d40a2 100644 --- a/autotests/ksharedconfigtest.cpp +++ b/autotests/ksharedconfigtest.cpp @@ -30,6 +30,7 @@ private Q_SLOTS: void testUnicity(); void testReadWrite(); void testReadWriteSync(); + void testQrcFile(); private: QString m_path; }; @@ -79,6 +80,16 @@ void KSharedConfigTest::testReadWriteSync() } } +void KSharedConfigTest::testQrcFile() +{ + QVERIFY(QFile::exists(QStringLiteral(":/testdata/test.ini"))); + KSharedConfig::Ptr sharedConfig = KSharedConfig::openConfig(QStringLiteral(":/testdata/test.ini"), KConfig::NoGlobals); + QVERIFY(sharedConfig); + + KConfigGroup cfg(sharedConfig, QStringLiteral("MainSection")); + QCOMPARE(cfg.readEntry(QStringLiteral("TestEntry"), QStringLiteral("UnexpectedData")), QStringLiteral("ExpectedData")); +} + QTEST_MAIN(KSharedConfigTest) #include "ksharedconfigtest.moc" |