changeset 28593:aea409195613

'=' and ',' are valid nodeprep characters
author Paul Aurich <paul@darkrain42.org>
date Tue, 17 Nov 2009 22:03:50 +0000
parents d537567d051f
children ecca39fe50d7
files libpurple/tests/test_jabber_jutil.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/tests/test_jabber_jutil.c	Tue Nov 17 19:10:17 2009 +0000
+++ b/libpurple/tests/test_jabber_jutil.c	Tue Nov 17 22:03:50 2009 +0000
@@ -40,6 +40,8 @@
 	fail_unless(jabber_nodeprep_validate("foo"));
 	fail_unless(jabber_nodeprep_validate("%d"));
 	fail_unless(jabber_nodeprep_validate("y\\z"));
+	fail_unless(jabber_nodeprep_validate("a="));
+	fail_unless(jabber_nodeprep_validate("a,"));
 
 	longnode = g_strnfill(1023, 'a');
 	fail_unless(jabber_nodeprep_validate(longnode));
@@ -118,6 +120,8 @@
 	assert_valid_jid("paul@[::1]"); /* IPv6 */
 	assert_valid_jid("paul@[2001:470:1f05:d58::2]");
 	assert_valid_jid("paul@[2001:470:1f05:d58::2]/foo");
+	assert_valid_jid("pa=ul@10.0.42.230");
+	assert_valid_jid("pa,ul@10.0.42.230");
 
 	assert_invalid_jid("@gmail.com");
 	assert_invalid_jid("@@gmail.com");