[svn-commits] alecdavis: trunk r249449 - /trunk/apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Feb 28 10:36:51 CST 2010


Author: alecdavis
Date: Sun Feb 28 10:36:45 2010
New Revision: 249449

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249449
Log:
make unit test check for NULL folder, which then defaults to INBOX

previous test, gave false level of assurance that code was healthy.

(issue #16927)
Reported by: alecdavis
Patches: 
      based on app_voicemail_test.diff.txt uploaded by alecdavis (license 585)

Tested by: alecdavis

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=249449&r1=249448&r2=249449
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sun Feb 28 10:36:45 2010
@@ -11682,7 +11682,8 @@
 
 		/* hasvm-old, hasvm-urgent, hasvm-new, ic-old, ic-urgent, ic-new, ic2-old, ic2-urgent, ic2-new, mc-old, mc-urgent, mc-new */
 		for (j = 0; j < 3; j++) {
-			if (ast_app_has_voicemail(testspec, folders[j]) != expected_results[i][0 + j]) {
+			/* folder[2] is INBOX, __has_voicemail will default back to INBOX */ 
+			if (ast_app_has_voicemail(testspec, (j==2 ? NULL : folders[j])) != expected_results[i][0 + j]) {
 				ast_test_status_update(test, "has_voicemail(%s, %s) returned %d and we expected %d\n",
 					testspec, folders[j], ast_app_has_voicemail(testspec, folders[j]), expected_results[i][0 + j]);
 				res = AST_TEST_FAIL;




More information about the svn-commits mailing list