apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/test CuTest.c
Date Thu, 24 Oct 2002 00:29:17 GMT
rbb         2002/10/23 17:29:17

  Modified:    test     CuTest.c
  Log:
  Finish cleaning up the test suite's output.
  
  Revision  Changes    Path
  1.7       +10 -1     apr/test/CuTest.c
  
  Index: CuTest.c
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CuTest.c	23 Oct 2002 23:28:12 -0000	1.6
  +++ CuTest.c	24 Oct 2002 00:29:17 -0000	1.7
  @@ -363,6 +363,14 @@
   	}
   }
   
  +static const char *genspaces(int i)
  +{
  +    char *str = malloc((i + 1) * sizeof(char));
  +    memset(str, ' ', i);
  +    str[i] = '\0';
  +    return str;
  +}
  +
   void CuSuiteListRunWithSummary(CuSuiteList* testSuite)
   {
   	int i;
  @@ -373,7 +381,8 @@
   		CuSuite* testCase = testSuite->list[i];
   		CuString *str = CuStringNew();
   
  -	        printf("%s:\t", testCase->name);
  +	        printf("    %s:%s", testCase->name, 
  +                                  genspaces(21 - strlen(testCase->name)));
   		CuSuiteRun(testCase);
   		CuSuiteSummary(testCase, str);
   		printf("    %s", str->buffer);
  
  
  

Mime
View raw message