Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
dae21685
Commit
dae21685
authored
Oct 19, 2015
by
Gautier Pelloux-Prayer
Browse files
proxy_config_tester.c: add unicode test for invalid writes
parent
68ff7716
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tester/proxy_config_tester.c
tester/proxy_config_tester.c
+6
-1
No files found.
tester/proxy_config_tester.c
View file @
dae21685
...
...
@@ -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
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment