diff options
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"  | 
