summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-08-09 22:08:17 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-08-09 22:08:17 (GMT)
commitb31d9153c84aef93a3192b2fc4ae271e8a18d9b7 (patch)
treea0b74cef59eda43e2ff5fdc8be7b41e1f3bd1b03
parent470178f429c17e73e080a95bb6ca391664063ed2 (diff)
downloadlibkolabxml-b31d9153c84aef93a3192b2fc4ae271e8a18d9b7.tar.gz
test to prove that utf8 characters are preserved
-rw-r--r--tests/bindingstest.cpp12
-rw-r--r--tests/bindingstest.h2
2 files changed, 14 insertions, 0 deletions
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