annotate libpurple/tests/test_jabber_jutil.c @ 27533:3599729ce9ce

More tests, some with an international flavor. I have no idea what that string means... I just copied it from an email
author Mark Doliner <mark@kingant.net>
date Fri, 10 Jul 2009 18:51:18 +0000
parents c6fea4ae68b3
children 91fefa830798
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15889
6577b292e7b4 Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents: 15374
diff changeset
1 #include <string.h>
6577b292e7b4 Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents: 15374
diff changeset
2
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 #include "tests.h"
15892
5bd5af818afe Update #includes to match changes in jabber
Stu Tomlinson <stu@nosnilmot.com>
parents: 15889
diff changeset
4 #include "../account.h"
5bd5af818afe Update #includes to match changes in jabber
Stu Tomlinson <stu@nosnilmot.com>
parents: 15889
diff changeset
5 #include "../conversation.h"
5bd5af818afe Update #includes to match changes in jabber
Stu Tomlinson <stu@nosnilmot.com>
parents: 15889
diff changeset
6 #include "../xmlnode.h"
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 #include "../protocols/jabber/jutil.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 START_TEST(test_get_resource)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 assert_string_equal_free("baz", jabber_get_resource("foo@bar/baz"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 assert_string_equal_free("baz", jabber_get_resource("bar/baz"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 assert_string_equal_free("baz/bat", jabber_get_resource("foo@bar/baz/bat"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 assert_string_equal_free("baz/bat", jabber_get_resource("bar/baz/bat"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 START_TEST(test_get_resource_no_resource)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 fail_unless(NULL == jabber_get_resource("foo@bar"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 fail_unless(NULL == jabber_get_resource("bar"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 START_TEST(test_get_bare_jid)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 assert_string_equal_free("foo@bar", jabber_get_bare_jid("foo@bar"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 assert_string_equal_free("foo@bar", jabber_get_bare_jid("foo@bar/baz"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 assert_string_equal_free("bar", jabber_get_bare_jid("bar"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 assert_string_equal_free("bar", jabber_get_bare_jid("bar/baz"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 START_TEST(test_nodeprep_validate)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 {
15889
6577b292e7b4 Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents: 15374
diff changeset
37 char *longnode;
6577b292e7b4 Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents: 15374
diff changeset
38
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 fail_unless(jabber_nodeprep_validate(NULL));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 fail_unless(jabber_nodeprep_validate("foo"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 fail_unless(jabber_nodeprep_validate("%d"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 fail_unless(jabber_nodeprep_validate("y\\z"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
15889
6577b292e7b4 Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents: 15374
diff changeset
44 longnode = g_strnfill(1023, 'a');
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 fail_unless(jabber_nodeprep_validate(longnode));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 g_free(longnode);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
49
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
50 START_TEST(test_nodeprep_validate_illegal_chars)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 fail_if(jabber_nodeprep_validate("don't"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 fail_if(jabber_nodeprep_validate("m@ke"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 fail_if(jabber_nodeprep_validate("\"me\""));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 fail_if(jabber_nodeprep_validate("&ngry"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 fail_if(jabber_nodeprep_validate("c:"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 fail_if(jabber_nodeprep_validate("a/b"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 fail_if(jabber_nodeprep_validate("4>2"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 fail_if(jabber_nodeprep_validate("4<7"));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 START_TEST(test_nodeprep_validate_too_long)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 char *longnode = g_strnfill(1024, 'a');
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 fail_if(jabber_nodeprep_validate(longnode));
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 g_free(longnode);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 END_TEST
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
71 #define assert_valid_jid(str) { \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
72 JabberID *jid = jabber_id_new(str); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
73 fail_if(jid == NULL, "JID '%s' is valid but jabber_id_new() rejected it", str); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
74 jabber_id_free(jid); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
75 }
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
76
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
77 #define assert_invalid_jid(str) { \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
78 JabberID *jid = jabber_id_new(str); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
79 fail_if(jid != NULL, "JID '%s' is invalid but jabber_id_new() allowed it", str); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
80 jabber_id_free(jid); \
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
81 }
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
82
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
83 START_TEST(test_jabber_id_new)
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
84 {
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
85 assert_valid_jid("gmail.com");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
86 assert_valid_jid("gmail.com/Test");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
87 assert_valid_jid("gmail.com/Test@");
27529
c6fea4ae68b3 Two more JID tests.
Paul Aurich <paul@darkrain42.org>
parents: 27528
diff changeset
88 assert_valid_jid("gmail.com/@");
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
89 assert_valid_jid("gmail.com/Test@alkjaweflkj");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
90 assert_valid_jid("mark.doliner@gmail.com");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
91 assert_valid_jid("mark.doliner@gmail.com/Test12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
92 assert_valid_jid("mark.doliner@gmail.com/Test@12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
93 assert_valid_jid("mark.doliner@gmail.com/Te/st@12@//345");
27533
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
94 assert_valid_jid("わいど@conference.jabber.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
95 assert_valid_jid("まりるーむ@conference.jabber.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
96 assert_valid_jid("mark.doliner@gmail.com/まりるーむ");
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
97
27529
c6fea4ae68b3 Two more JID tests.
Paul Aurich <paul@darkrain42.org>
parents: 27528
diff changeset
98 assert_invalid_jid("@gmail.com");
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
99 assert_invalid_jid("@@gmail.com");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
100 assert_invalid_jid("mark.doliner@@gmail.com/Test12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
101 assert_invalid_jid("mark@doliner@gmail.com/Test12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
102 assert_invalid_jid("@gmail.com/Test@12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
103 assert_invalid_jid("/Test@12345");
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
104 assert_invalid_jid("mark.doliner@");
27528
2131abd387f9 I thought of another invalid JID. I'm changing jabber_id_new() so that all
Mark Doliner <mark@kingant.net>
parents: 27527
diff changeset
105 assert_invalid_jid("mark.doliner/");
27533
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
106 assert_valid_jid("mark.doliner@gmail_stuff.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
107 assert_valid_jid("mark.doliner@gmail[stuff.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
108 assert_valid_jid("mark.doliner@gmail/stuff.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
109 assert_valid_jid("mark.doliner@gmail\\stuff.org");
3599729ce9ce More tests, some with an international flavor. I have no idea what that
Mark Doliner <mark@kingant.net>
parents: 27529
diff changeset
110 assert_valid_jid("mark.doliner@わいど.org");
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
111 }
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
112 END_TEST
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
113
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 Suite *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 jabber_jutil_suite(void)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 Suite *s = suite_create("Jabber Utility Functions");
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 TCase *tc = tcase_create("Get Resource");
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 tcase_add_test(tc, test_get_resource);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 tcase_add_test(tc, test_get_resource_no_resource);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 suite_add_tcase(s, tc);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 tc = tcase_create("Get Bare JID");
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 tcase_add_test(tc, test_get_bare_jid);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 suite_add_tcase(s, tc);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
128 tc = tcase_create("JID validate");
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 tcase_add_test(tc, test_nodeprep_validate);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 tcase_add_test(tc, test_nodeprep_validate_illegal_chars);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 tcase_add_test(tc, test_nodeprep_validate_too_long);
27527
962ce369fc35 Add tests for jabber_id_new(). Please add to this! JIDs with accented
Mark Doliner <mark@kingant.net>
parents: 15892
diff changeset
132 tcase_add_test(tc, test_jabber_id_new);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 suite_add_tcase(s, tc);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 return s;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 }