aboutsummaryrefslogtreecommitdiff
path: root/autotests/ksharedconfigtest.cpp
diff options
context:
space:
mode:
authorSune Vuorela <sune@vuorela.dk>2015-06-15 20:03:54 +0200
committerSune Vuorela <sune@vuorela.dk>2015-06-15 20:03:54 +0200
commita5bb0860caf443cb89a7d4b67a040485e7509e74 (patch)
treefe5c571ec9236f556aee5eb976f3b748ef3f5dbc /autotests/ksharedconfigtest.cpp
parent5c1a50b7917bc901ff8f04f93b33215d787e7b64 (diff)
downloadkconfig-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.cpp11
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"