kdelibs/kdecore/tests/kcharsetstest.cpp

21 lines
419 B
C++
Raw Normal View History

#include <qtest_kde.h>
2014-11-13 01:04:59 +02:00
#include <kcharsets.h>
class KCharsetsTest : public QObject
2014-11-13 01:04:59 +02:00
{
Q_OBJECT
private Q_SLOTS:
void resolveEntities();
};
2014-11-13 01:04:59 +02:00
QTEST_KDEMAIN_CORE( KCharsetsTest )
2014-11-13 01:04:59 +02:00
void KCharsetsTest::resolveEntities()
{
2014-11-13 01:04:59 +02:00
QString input( "&lt;Hello &amp;World&gt;" );
QString output = KCharsets::resolveEntities( input );
QCOMPARE(output, QLatin1String("<Hello &World>"));
2014-11-13 01:04:59 +02:00
}
#include "kcharsetstest.moc"