apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/test testdir.c
Date Thu, 28 Jun 2001 14:05:23 GMT
bjh         01/06/28 07:05:22

  Modified:    test     testdir.c
  Log:
  Make testdir more portable
  - On anything not unix, a file must be closed before it can be deleted
  - Use APR_STATUS_IS_ENOENT to test for ENOENT.
  
  Revision  Changes    Path
  1.2       +5 -3      apr/test/testdir.c
  
  Index: testdir.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testdir.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- testdir.c	2001/06/15 20:04:39	1.1
  +++ testdir.c	2001/06/28 14:05:20	1.2
  @@ -93,6 +93,8 @@
                    apr_file_open(&thefile, "dir1/file1",
                                  APR_READ | APR_WRITE | APR_CREATE,
                                  APR_OS_DEFAULT, pool))
  +    STD_TEST_NEQ("    Closing dir1/file1",
  +                 apr_file_close(thefile))
   
       /* Try to remove dir1.  This should fail because it's not empty.
          However, on a platform with threads disabled (such as FreeBSD),
  @@ -112,9 +114,9 @@
          underlying system readdir() returns NULL, the old value of
          errno shouldn't cause a false alarm.  We should get an ENOENT
          back from apr_dir_read, and *not* the old errno. */
  -    TEST_NEQ("       get ENOENT on 3rd read", 
  -             apr_dir_read(&finfo, finfo_flags, this_dir),
  -             APR_ENOENT, "OK", "Failed")
  +    TEST_STATUS("       get ENOENT on 3rd read", 
  +                apr_dir_read(&finfo, finfo_flags, this_dir),
  +                APR_STATUS_IS_ENOENT, "OK", "Failed")
   
       /* Cleanup */
       STD_TEST_NEQ("    Cleanup file1",
  
  
  

Mime
View raw message