mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
proxy_config_tester.c: add unicode test for invalid writes
This commit is contained in:
parent
68ff77160e
commit
dae216855c
1 changed files with 6 additions and 1 deletions
|
|
@ -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[] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue