Mercurial > pidgin
view libpurple/tests/tests.h @ 28255:79c14adf9669
Change purple_url_encode() to not encode . _ - ~ because it's not
necessary. Also use capital letters instead of lowercase. RFC3986
says capital letters are a SHOULD and that lowercase letters should
be equivalent.
AOL's clientlogin authentication requires both of these changes for
our signature to match up with the signature generated on AOL's side.
Original I had implemented an oscar-specific version of our url
encode function with these two changes, but I'm pretty sure it's
safe to make this in purple_url_encode(). It looks like it's almost
always used to encode pieces of URLs. MSN uses it for a few other
things... I tested setting those characters in your friendly name
and it works fine.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 11 Sep 2009 18:17:03 +0000 |
parents | 72b9fb05bf26 |
children | 338eeaf371e2 |
line wrap: on
line source
#ifndef TESTS_H # define TESTS_H #include "../purple.h" #include <check.h> /* define the test suites here */ /* remember to add the suite to the runner in check_libpurple.c */ Suite * master_suite(void); Suite * cipher_suite(void); Suite * jabber_jutil_suite(void); Suite * qq_suite(void); Suite * yahoo_util_suite(void); Suite * util_suite(void); /* helper macros */ #define assert_int_equal(expected, actual) { \ fail_if(expected != actual, "Expected '%d' but got '%d'", expected, actual); \ } #define assert_string_equal(expected, actual) { \ const gchar *a = actual; \ fail_unless(strcmp(expected, a) == 0, "Expected '%s' but got '%s'", expected, a); \ } #define assert_string_equal_free(expected, actual) { \ gchar *b = actual; \ assert_string_equal(expected, b); \ g_free(b); \ } #endif /* ifndef TESTS_H */