tests/bindingstest.cpp tests/bindingstest.h

Christian Mollekopf mollekopf at kolabsys.com
Fri Aug 10 00:08:25 CEST 2012


 tests/bindingstest.cpp |   12 ++++++++++++
 tests/bindingstest.h   |    2 ++
 2 files changed, 14 insertions(+)

New commits:
commit b31d9153c84aef93a3192b2fc4ae271e8a18d9b7
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Fri Aug 10 00:08:17 2012 +0200

    test to prove that utf8 characters are preserved

diff --git a/tests/bindingstest.cpp b/tests/bindingstest.cpp
index 0548caa..337acec 100644
--- a/tests/bindingstest.cpp
+++ b/tests/bindingstest.cpp
@@ -719,6 +719,18 @@ void BindingsTest::BenchmarkRoundtrip()
     }
 }
 
+void BindingsTest::preserveUtf8()
+{
+    Kolab::Event event;
+    event.setSummary("äöü");
+    std::string result = Kolab::writeEvent(event);
+//     std::cout << result << std::endl;
+    Kolab::Event readEvent = Kolab::readEvent(result, false);
+//     std::cout << readEvent.summary() << std::endl;
+    QCOMPARE(readEvent.summary(), event.summary());
+}
+
+
 QTEST_MAIN( BindingsTest )
 
 #include "bindingstest.moc"
diff --git a/tests/bindingstest.h b/tests/bindingstest.h
index b5f7ce0..260864d 100644
--- a/tests/bindingstest.h
+++ b/tests/bindingstest.h
@@ -44,6 +44,8 @@ class BindingsTest : public QObject
     void BenchmarkRoundtripKolab();
     void BenchmarkRoundtrip();
 
+    void preserveUtf8();
+
 };
 
 #endif
\ No newline at end of file





More information about the commits mailing list