Mercurial > pidgin.yaz
annotate libpurple/tests/test_util.c @ 27526:7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
What a great macro!
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 10 Jul 2009 05:05:51 +0000 |
parents | 6271a72ba4f6 |
children | 8c41a23e6b44 |
rev | line source |
---|---|
15889
6577b292e7b4
Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
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:
15823
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" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 #include "../util.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 START_TEST(test_util_base16_encode) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 { |
26301
ba1799f21383
Cast away a few compile warnings in our "make check" tests, and add
Mark Doliner <mark@kingant.net>
parents:
22199
diff
changeset
|
8 assert_string_equal_free("68656c6c6f2c20776f726c642100", purple_base16_encode((const unsigned char *)"hello, world!", 14)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 START_TEST(test_util_base16_decode) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 gsize sz = 0; |
15823 | 15 guchar *out = purple_base16_decode("21646c726f77202c6f6c6c656800", &sz); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 fail_unless(sz == 14, NULL); |
27526
7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
Mark Doliner <mark@kingant.net>
parents:
27330
diff
changeset
|
17 assert_string_equal_free("!dlrow ,olleh", (char *)out); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 END_TEST |
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 START_TEST(test_util_base64_encode) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 { |
26301
ba1799f21383
Cast away a few compile warnings in our "make check" tests, and add
Mark Doliner <mark@kingant.net>
parents:
22199
diff
changeset
|
23 assert_string_equal_free("Zm9ydHktdHdvAA==", purple_base64_encode((const unsigned char *)"forty-two", 10)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 START_TEST(test_util_base64_decode) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 gsize sz; |
15823 | 30 guchar *out = purple_base64_decode("b3d0LXl0cm9mAA==", &sz); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 fail_unless(sz == 10, NULL); |
27526
7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
Mark Doliner <mark@kingant.net>
parents:
27330
diff
changeset
|
32 assert_string_equal_free("owt-ytrof", (char *)out); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 START_TEST(test_util_escape_filename) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 { |
15823 | 38 assert_string_equal("foo", purple_escape_filename("foo")); |
39 assert_string_equal("@oo", purple_escape_filename("@oo")); | |
40 assert_string_equal("#oo", purple_escape_filename("#oo")); | |
41 assert_string_equal("-oo", purple_escape_filename("-oo")); | |
42 assert_string_equal("_oo", purple_escape_filename("_oo")); | |
43 assert_string_equal(".oo", purple_escape_filename(".oo")); | |
44 assert_string_equal("%25oo", purple_escape_filename("%oo")); | |
45 assert_string_equal("%21oo", purple_escape_filename("!oo")); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 START_TEST(test_util_unescape_filename) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 { |
15823 | 51 assert_string_equal("bar", purple_unescape_filename("bar")); |
52 assert_string_equal("@ar", purple_unescape_filename("@ar")); | |
53 assert_string_equal("!ar", purple_unescape_filename("!ar")); | |
54 assert_string_equal("!ar", purple_unescape_filename("%21ar")); | |
55 assert_string_equal("%ar", purple_unescape_filename("%25ar")); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 START_TEST(test_util_text_strip_mnemonic) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 { |
15823 | 62 assert_string_equal_free("", purple_text_strip_mnemonic("")); |
63 assert_string_equal_free("foo", purple_text_strip_mnemonic("foo")); | |
64 assert_string_equal_free("foo", purple_text_strip_mnemonic("_foo")); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 END_TEST |
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 START_TEST(test_util_email_is_valid) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 { |
15823 | 71 fail_unless(purple_email_is_valid("purple-devel@lists.sf.net")); |
22197
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
72 fail_if(purple_email_is_valid("purple-devel@@lists.sf.net")); |
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
73 fail_if(purple_email_is_valid("purple@devel@lists.sf.net")); |
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
74 fail_if(purple_email_is_valid("purple-devel@list..sf.net")); |
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
75 fail_if(purple_email_is_valid("purple-devel")); |
22199
5aacf801f6b6
One more test. This is actually the one I cared about. It passes,
Mark Doliner <mark@kingant.net>
parents:
22197
diff
changeset
|
76 fail_if(purple_email_is_valid("purple-devel@")); |
22197
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
77 fail_if(purple_email_is_valid("@lists.sf.net")); |
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
78 fail_if(purple_email_is_valid("")); |
a67c0aa4db9c
Add a few tets to make sure we're catching some invalid email formats
Mark Doliner <mark@kingant.net>
parents:
21612
diff
changeset
|
79 fail_if(purple_email_is_valid("totally bogus")); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 END_TEST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 |
16004
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
83 START_TEST(test_util_str_to_time) |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
84 { |
21612
18fb032a602a
Fix the bug in purple_str_to_time() that was causing 'make check' to fail.
Stu Tomlinson <stu@nosnilmot.com>
parents:
21152
diff
changeset
|
85 fail_unless(377182200 == purple_str_to_time("19811214T12:50:00", TRUE, NULL, NULL, NULL)); |
16004
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
86 fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21", TRUE, NULL, NULL, NULL)); |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
87 } |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
88 END_TEST |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
89 |
21152
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
90 START_TEST(test_markup_html_to_xhtml) |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
91 { |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
92 gchar *xhtml = NULL; |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
93 gchar *plaintext = NULL; |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
94 purple_markup_html_to_xhtml("<a>", &xhtml, &plaintext); |
27526
7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
Mark Doliner <mark@kingant.net>
parents:
27330
diff
changeset
|
95 assert_string_equal_free("<a href=\"\"></a>", xhtml); |
7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
Mark Doliner <mark@kingant.net>
parents:
27330
diff
changeset
|
96 assert_string_equal_free("", plaintext); |
21152
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
97 } |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
98 END_TEST |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
99 |
27330
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
100 START_TEST(test_mime_decode_field) |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
101 { |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
102 gchar *result = purple_mime_decode_field("=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?="); |
27526
7bdad85c5fed
Use assert_string_equal_free() instead of just assert_string_equal()
Mark Doliner <mark@kingant.net>
parents:
27330
diff
changeset
|
103 assert_string_equal_free("Keld Jørn Simonsen", result); |
27330
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
104 } |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
105 END_TEST |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
106 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
107 Suite * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
108 util_suite(void) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 Suite *s = suite_create("Utility Functions"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 TCase *tc = tcase_create("Base16"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 tcase_add_test(tc, test_util_base16_encode); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 tcase_add_test(tc, test_util_base16_decode); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
115 suite_add_tcase(s, tc); |
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 tc = tcase_create("Base64"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 tcase_add_test(tc, test_util_base64_encode); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 tcase_add_test(tc, test_util_base64_decode); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 suite_add_tcase(s, tc); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 tc = tcase_create("Filenames"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 tcase_add_test(tc, test_util_escape_filename); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 tcase_add_test(tc, test_util_unescape_filename); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 suite_add_tcase(s, tc); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
127 tc = tcase_create("Strip Mnemonic"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 tcase_add_test(tc, test_util_text_strip_mnemonic); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 suite_add_tcase(s, tc); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 tc = tcase_create("Email"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
132 tcase_add_test(tc, test_util_email_is_valid); |
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 |
16004
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
135 tc = tcase_create("Time"); |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
136 tcase_add_test(tc, test_util_str_to_time); |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
137 suite_add_tcase(s, tc); |
b4593c886933
fix our string-to-time function, and add a couple tests for it
Nathan Walp <nwalp@pidgin.im>
parents:
15889
diff
changeset
|
138 |
21152
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
139 tc = tcase_create("Markup"); |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
140 tcase_add_test(tc, test_markup_html_to_xhtml); |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
141 suite_add_tcase(s, tc); |
1dd6704cd187
Add a test for the html markup parsing to try to prevent a repeat of 2.2.2
Stu Tomlinson <stu@nosnilmot.com>
parents:
16004
diff
changeset
|
142 |
27330
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
143 tc = tcase_create("MIME"); |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
144 tcase_add_test(tc, test_mime_decode_field); |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
145 suite_add_tcase(s, tc); |
6271a72ba4f6
* Use our assert_string_equal() macro instead of fail_unless(strcmp(), NULL)
Mark Doliner <mark@kingant.net>
parents:
26301
diff
changeset
|
146 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 return s; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 } |