[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdenetwork/kopete/libkopete/tests
From: Martijn Klingens <klingens () kde ! org>
Date: 2007-02-23 23:57:04
Message-ID: 1172275024.692760.30731.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 636731 by mklingens:
Add several more testcases, fix existing ones
M +11 -3 kopetemessage_test.cpp
--- branches/KDE/3.5/kdenetwork/kopete/libkopete/tests/kopetemessage_test.cpp \
#636730:636731 @@ -167,17 +167,25 @@
CHECK(m, msg.plainBody());
msg.setBody("<simple> SIMPLE", Kopete::Message::PlainText);
- CHECK(QString("<simple> SIMPLE"), msg.plainBody());
- CHECK(QString("<simple> SIMPLE"), msg.escapedBody());
+ CHECK(msg.plainBody(), QString("<simple> SIMPLE") );
+ CHECK(msg.escapedBody(), QString("<simple> SIMPLE") );
+ msg.setBody("<simple>SIMPLE</simple>", Kopete::Message::RichText);
+ CHECK(msg.plainBody(), QString("SIMPLE") );
+ CHECK(msg.escapedBody(), QString("<simple>SIMPLE</simple>") );
+
+ CHECK(Kopete::Message::unescape( QString( "<simple>SIMPLE</simple>" ) ), \
QString("SIMPLE") ); +
msg.setBody(m, Kopete::Message::RichText);
// FIXME: Should setBody() also strip extra white space?
//CHECK(msg.plainBody(), QString("HELLO WORLD"));
//CHECK(msg.escapedBody(), QString("<b>HELLO WORLD</b>"));
+ CHECK(msg.escapedBody(), QString(" <b>HELLO WORLD</b> \
")); + CHECK(msg.plainBody(), QString(" HELLO WORLD \
")); CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD"));
- CHECK(msg.escapedBody().stripWhiteSpace(), QString("<b>HELLO WORLD</b>"));
+ CHECK(msg.escapedBody().stripWhiteSpace(), QString(" <b>HELLO WORLD</b> \
")); }
{
Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, \
Kopete::Message::PlainText);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic