Fri Apr 18 06:55:45 EDT 2008 Pekka.Pessi@nokia.com

* torture_sip.c: added test for sip_header_as_string() producing string longer than 128

Fri Apr 18 06:55:45 EDT 2008  Pekka.Pessi@nokia.com
  UNDO: torture_sip.c: added test for sip_header_as_string() producing string longer than 128

Wed Apr 23 13:56:40 EDT 2008  Pekka.Pessi@nokia.com
  * torture_sip.c: added test for sip_header_as_string() producing string longer than 128



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8181 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-04-23 18:37:18 +00:00
parent ae4b779567
commit 6b46b8e0b6
1 changed files with 26 additions and 1 deletions

View File

@ -2247,6 +2247,31 @@ static int test_content_disposition(void)
END();
}
static int test_www_authenticate(void)
{
sip_www_authenticate_t *www;
su_home_t *home;
char const *s;
BEGIN();
TEST_1(home = su_home_create());
TEST_1(www = sip_www_authenticate_make
(home, "Digest realm=\"Registered_Subscribers\",\n"
"domain=\"sip:206.229.26.61\",\n"
"nonce=\"20dfb7e5a77abee7a02dbe53efe42cdd\", "
"opaque=\"423767123y723742376423762376423784623782a794e58\",\n"
"stale=FALSE,algorithm=MD5"));
TEST_S(www->au_scheme, "Digest");
TEST_1(www->au_params && www->au_params[0] && www->au_params[1] && www->au_params[2] &&
www->au_params[3] && www->au_params[4] && www->au_params[5] &&
!www->au_params[6]);
TEST_1(s = sip_header_as_string(home, (sip_header_t *)www));
TEST_1(strlen(s) >= 128);
su_home_unref(home);
END();
}
int test_retry_after(void)
{
/* Test Session-Expires header */
@ -3548,7 +3573,7 @@ int main(int argc, char *argv[])
retval |= test_caller_prefs(); fflush(stdout);
retval |= test_callerpref_scoring(); fflush(stdout);
retval |= test_warning(); fflush(stdout);
retval |= test_www_authenticate(); fflush(stdout);
retval |= test_sec_ext(); fflush(stdout);
retval |= test_utils(); fflush(stdout);