Commit dae21685 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

proxy_config_tester.c: add unicode test for invalid writes

parent 68ff7716
......@@ -87,11 +87,14 @@ static void phone_normalization_with_dial_escape_plus(void){
}
#define SIP_URI_CHECK(actual, expected) { \
LinphoneAddress* res = linphone_proxy_config_normalize_sip_uri(NULL, actual); \
LinphoneProxyConfig *proxy = linphone_proxy_config_new(); \
linphone_proxy_config_set_identity(proxy, "sip:username@linphone.org"); \
LinphoneAddress* res = linphone_proxy_config_normalize_sip_uri(proxy, actual); \
char* actual_str = linphone_address_as_string_uri_only(res); \
BC_ASSERT_STRING_EQUAL(actual_str, expected); \
ms_free(actual_str); \
linphone_address_destroy(res); \
linphone_proxy_config_destroy(proxy); \
}
......@@ -99,6 +102,8 @@ static void sip_uri_normalization(void) {
BC_ASSERT_PTR_NULL(linphone_proxy_config_normalize_sip_uri(NULL, "test"));
SIP_URI_CHECK("test@linphone.org", "sip:test@linphone.org");
SIP_URI_CHECK("test@linphone.org;transport=tls", "sip:test@linphone.org;transport=tls");
SIP_URI_CHECK("١", "sip:%%d9%%a1@linphone.org"); //test that no more invalid write are done (valgrind only)
}
test_t proxy_config_tests[] = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment