[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:21:58 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=96e287c

The following commit has been merged in the master branch:
commit 96e287c7db4e8947f1c9cc8c01cbf8213e56f0b9
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat May 5 20:39:19 2012 +1000

    Add tests for Gtalk formatting plugin
    
    This fills in the stubs that were in the last commit. The tests
    still fail though, since it's not implemented.
---
 tests/message-processor-basic-tests.cpp | 21 ++++++++++++---------
 tests/message-processor-basic-tests.h   |  1 +
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/tests/message-processor-basic-tests.cpp b/tests/message-processor-basic-tests.cpp
index 172c4b5..2b2e952 100644
--- a/tests/message-processor-basic-tests.cpp
+++ b/tests/message-processor-basic-tests.cpp
@@ -89,37 +89,40 @@ void MessageProcessorBasicTests::testMultipleURLCatching()
     QFAIL("not written yet");
 }
 
-void MessageProcessorBasicTests::testBold()
-{
-    QString processed = this->s.getProcessedMessage("fakeprotocol://fakeuser@somefakehost/");
-    QString href = QLatin1String("fakeprotocol://fakeuser@somefakehost/");
+void MessageProcessorBasicTests::compare(const char *input, const char *expected) {
+    QString processed = s.getProcessedMessage(input);
+    QString href = QLatin1String(expected);
 
     QCOMPARE(processed, href);
 }
 
 void MessageProcessorBasicTests::testBold()
 {
-    QFAIL("not written yet");
+    compare("**b**", "<b>b</b>");
 }
 
 void MessageProcessorBasicTests::testBoldItalics()
 {
-    QFAIL("not written yet");
+    compare("_*this is bold italics_*", "<i><b>this is bold italics</b></i>");
+    compare("_*this is bold italics*_", "<i><b>this is bold italics</i></b>");
 }
 
 void MessageProcessorBasicTests::testMultiWordItalics()
 {
-    QFAIL("not written yet");
+    compare("_this_ text should _be_ in _italics_", "<i>all _ this _hsould</i> be in italics_");
+    compare("_f f_ fd _f f_", "<i>f f</i> fd <i>f f</i>");
+    compare("_f _f_", "<i>f _f</i>");
+    compare("_dsd _ _ ss_", "<i>dsd _ _ ss</i>");
 }
 
 void MessageProcessorBasicTests::testSingleWordItalics()
 {
-    QFAIL("not written yet");
+    compare("_b_", "<i>b</i>");
 }
 
 void MessageProcessorBasicTests::testStrikethrough()
 {
-    QFAIL("not written yet");
+    compare("-striek through-", "<s>striek through</s>");
 }
 
 QTEST_MAIN(MessageProcessorBasicTests);
diff --git a/tests/message-processor-basic-tests.h b/tests/message-processor-basic-tests.h
index 32af844..8b09fda 100644
--- a/tests/message-processor-basic-tests.h
+++ b/tests/message-processor-basic-tests.h
@@ -28,6 +28,7 @@ class MessageProcessorBasicTests : public QObject
 Q_OBJECT
 
 private:
+    void compare (const char* arg1, const char* arg2);
     SyncProcessor s;
 
 private Q_SLOTS:

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list