[asterisk-commits] dvossel: trunk r244688 - /trunk/main/test.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 4 09:36:37 CST 2010


Author: dvossel
Date: Thu Feb  4 09:36:33 2010
New Revision: 244688

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=244688
Log:
fix truncated format string in 'test show registered'

When using the 'test show registered' cli command the 'Test Results'
category was truncating the last few characters making it look like 
'Test Resul'.  I also expanded other parts of the format to better
represent how long function names and categories will likely be.


Modified:
    trunk/main/test.c

Modified: trunk/main/test.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/test.c?view=diff&rev=244688&r1=244687&r2=244688
==============================================================================
--- trunk/main/test.c (original)
+++ trunk/main/test.c Thu Feb  4 09:36:33 2010
@@ -570,7 +570,7 @@
 /* CLI commands */
 static char *test_cli_show_registered(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-#define FORMAT "%-20.20s %-20.20s %-30.30s %-10.10s\n"
+#define FORMAT "%-30.30s %-25.25s %-40.40s %-13.13s\n"
 	static const char * const option1[] = { "all", "category", NULL };
 	static const char * const option2[] = { "name", NULL };
 	struct ast_test *test = NULL;
@@ -681,7 +681,7 @@
 
 static char *test_cli_show_results(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-#define FORMAT_RES_ALL "%s%s %-20.20s %-20.20s %-30.30s\n"
+#define FORMAT_RES_ALL "%s%s %-30.30s %-25.25s %-40.40s\n"
 	static const char * const option1[] = { "all", "failed", "passed", NULL };
 	char result_buf[32] = { 0 };
 	struct ast_test *test = NULL;




More information about the asterisk-commits mailing list