changeset 28778:aba0ab6b4abd

Add another (IMHO unintuitive) JID test. Refs #10532. Thanks to MattJ, waqas, and Florob for their knowledge of Unicode/Stringprep.
author Paul Aurich <paul@darkrain42.org>
date Tue, 20 Oct 2009 19:38:35 +0000
parents 596dc351c162
children d1c18bd588e2
files libpurple/tests/test_jabber_jutil.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/tests/test_jabber_jutil.c	Mon Oct 19 22:56:57 2009 +0000
+++ b/libpurple/tests/test_jabber_jutil.c	Tue Oct 20 19:38:35 2009 +0000
@@ -134,6 +134,14 @@
 	assert_invalid_jid("paul@2[::1]124/as");
 	assert_invalid_jid("paul@まつ.おおかみ/\x01");
 
+	/*
+	 * RFC 3454 Section 6 reads, in part,
+	 * "If a string contains any RandALCat character, the
+	 *  string MUST NOT contain any LCat character."
+	 * The character is U+066D (ARABIC FIVE POINTED STAR).
+	 */
+	assert_invalid_jid("foo@example.com/٭simplexe٭");
+
 	/* Ensure that jabber_id_new is properly lowercasing node and domains */
 	assert_jid_parts("paul", "darkrain42.org", "PaUL@darkrain42.org");
 	assert_jid_parts("paul", "darkrain42.org", "paul@DaRkRaIn42.org");