[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-cvs
Subject:    cvs commit: apr/test testfile.c
From:       jorton () apache ! org
Date:       2004-05-24 14:12:11
Message-ID: 20040524141211.28834.qmail () minotaur ! apache ! org
[Download RAW message or body]

jorton      2004/05/24 07:12:11

  Modified:    test     testfile.c
  Log:
  * test/testfile.c (test_readzero): New test.
  
  Revision  Changes    Path
  1.76      +18 -0     apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -d -u -r1.75 -r1.76
  --- testfile.c	14 May 2004 14:43:22 -0000	1.75
  +++ testfile.c	24 May 2004 14:12:11 -0000	1.76
  @@ -90,6 +90,23 @@
       apr_file_close(filetest);
   }
   
  +static void test_readzero(abts_case *tc, void *data)
  +{
  +    apr_status_t rv;
  +    apr_size_t nbytes = 0;
  +    char *str = NULL;
  +    apr_file_t *filetest;
  +    
  +    rv = apr_file_open(&filetest, FILENAME, APR_READ, APR_OS_DEFAULT, p);
  +    apr_assert_success(tc, "Opening test file " FILENAME, rv);
  +
  +    rv = apr_file_read(filetest, str, &nbytes);
  +    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
  +    ABTS_INT_EQUAL(tc, 0, nbytes);
  +
  +    apr_file_close(filetest);
  +}
  +
   static void test_filename(abts_case *tc, void *data)
   {
       const char *str;
  @@ -536,6 +553,7 @@
       abts_run_test(suite, test_open_read, NULL);
       abts_run_test(suite, test_open_readwrite, NULL);
       abts_run_test(suite, test_read, NULL); 
  +    abts_run_test(suite, test_readzero, NULL); 
       abts_run_test(suite, test_seek, NULL);
       abts_run_test(suite, test_filename, NULL);
       abts_run_test(suite, test_fileclose, NULL);
  
  
  
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic