[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/tests
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2010-02-28 21:15:42
Message-ID: 1267391742.325907.4306.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1097299 by ossi:
test reading & writing of groups with accented chars - works
CCBUG: 217864
M +20 -0 kconfigtest.cpp
M +1 -0 kconfigtest.h
--- trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp #1097298:1097299
@@ -353,6 +353,26 @@
QCOMPARE(group.readEntry("stringEntry1", QString()), Untranslated);
}
+void KConfigTest::testEncoding()
+{
+ QString groupstr = QString::fromUtf8("UTF-8:\xc3\xb6l");
+
+ KConfig c( "kconfigtestencodings" );
+ KConfigGroup cg(&c, groupstr);
+ cg.writeEntry("key", "value");
+ c.sync();
+
+ QList<QByteArray> lines = readLines("kconfigtestencodings");
+ QCOMPARE(lines.count(), 2);
+ QCOMPARE(lines.first(), QByteArray("[UTF-8:\xc3\xb6l]\n"));
+
+ KConfig c2( "kconfigtestencodings" );
+ KConfigGroup cg2(&c2, groupstr);
+ QVERIFY(cg2.readEntry("key") == QByteArray("value"));
+
+ QVERIFY(c2.groupList().contains(groupstr));
+}
+
void KConfigTest::testLists()
{
KConfig sc2( "kconfigtest" );
--- trunk/KDE/kdelibs/kdecore/tests/kconfigtest.h #1097298:1097299
@@ -39,6 +39,7 @@
void testDefaults();
void testLists();
void testLocale();
+ void testEncoding();
void testPath();
void testPersistenceOfExpandFlagForPath();
void testComplex();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic