commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject cvs commit: jakarta-commons/io/src/test/org/apache/commons/io FileUtilsTestCase.java
Date Thu, 15 Jul 2004 09:49:53 GMT
jeremias    2004/07/15 02:49:53

  Modified:    io/src/test/org/apache/commons/io FileUtilsTestCase.java
  Log:
  Testing prerequisites for touch() test, making it safer.
  
  Revision  Changes    Path
  1.22      +5 -1      jakarta-commons/io/src/test/org/apache/commons/io/FileUtilsTestCase.java
  
  Index: FileUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- FileUtilsTestCase.java	15 Jul 2004 08:21:14 -0000	1.21
  +++ FileUtilsTestCase.java	15 Jul 2004 09:49:53 -0000	1.22
  @@ -453,6 +453,10 @@
   
       public void testTouch() throws IOException {
           File file = new File(getTestDirectory(), "touch.txt") ;
  +        if (file.exists()) {
  +            file.delete();
  +        }
  +        assertTrue("Prerequisite failed, test file exists", !file.exists());
           FileUtils.touch(file);
           assertTrue("FileUtils.touch() created file.", file.exists());
           FileOutputStream out = new FileOutputStream(file) ;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message