summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2013-07-22 19:21:29 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-07-27 12:20:38 (GMT)
commitb45602bcd36fb9d2e7a22998434e31014f072d33 (patch)
tree86eb092f01ea651358288e49173e4e20de117ed3 /Swiften/JID/UnitTest/JIDTest.cpp
parentd31fe6a73cf29df1e7bf0edd76c30aa124bb0328 (diff)
downloadswift-b45602bcd36fb9d2e7a22998434e31014f072d33.zip
swift-b45602bcd36fb9d2e7a22998434e31014f072d33.tar.bz2
Use nodeprep for nodes and nameprep for domains.
Change-Id: Iafe7f72aa2764c797fec736d4f5605c30254018a
Diffstat (limited to 'Swiften/JID/UnitTest/JIDTest.cpp')
-rw-r--r--Swiften/JID/UnitTest/JIDTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp
index 81d24ea..72ca884 100644
--- a/Swiften/JID/UnitTest/JIDTest.cpp
+++ b/Swiften/JID/UnitTest/JIDTest.cpp
@@ -24,6 +24,7 @@ class JIDTest : public CppUnit::TestFixture
CPPUNIT_TEST(testConstructorWithString_UpperCaseResource);
CPPUNIT_TEST(testConstructorWithString_EmptyNode);
CPPUNIT_TEST(testConstructorWithString_IllegalResource);
+ CPPUNIT_TEST(testConstructorWithString_SpacesInNode);
CPPUNIT_TEST(testConstructorWithStrings);
CPPUNIT_TEST(testConstructorWithStrings_EmptyDomain);
CPPUNIT_TEST(testIsBare);
@@ -137,6 +138,11 @@ class JIDTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(!testling.isValid());
}
+ void testConstructorWithString_SpacesInNode() {
+ CPPUNIT_ASSERT(!JID(" alice@wonderland.lit").isValid());
+ CPPUNIT_ASSERT(!JID("alice @wonderland.lit").isValid());
+ }
+
void testConstructorWithStrings() {
JID testling("foo", "bar", "baz");