commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons/io/src/test/org/apache/commons/io FileUtilsTestCase.java
Date Sun, 18 Apr 2004 07:29:00 GMT
bayard      2004/04/18 00:29:00

  Modified:    io/src/test/org/apache/commons/io FileUtilsTestCase.java
  Log:
  Commenting out FilenameUtils usage as it is not a part of 1.0
  
  Revision  Changes    Path
  1.16      +19 -17    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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- FileUtilsTestCase.java	14 Mar 2004 20:59:21 -0000	1.15
  +++ FileUtilsTestCase.java	18 Apr 2004 07:29:00 -0000	1.16
  @@ -389,30 +389,32 @@
           filename = replaceAll(filename, "%20", " ");
           String filename2 = "test2.txt";
   
  -        assertTrue(
  -            "test.txt extension == \"txt\"",
  -            FilenameUtils.getExtension(filename).equals("txt"));
  +//1.0 These lines commented out as FilenameUtils not in 1.0
  +//1.0        assertTrue(
  +//1.0            "test.txt extension == \"txt\"",
  +//1.0            FilenameUtils.getExtension(filename).equals("txt"));
   
  -        assertTrue(
  -            "Test file does not exist: " + filename,
  -            FilenameUtils.fileExists(filename));
  +//1.0        assertTrue(
  +//1.0            "Test file does not exist: " + filename,
  +//1.0            FilenameUtils.fileExists(filename));
   
  -        assertTrue(
  -            "Second test file does not exist",
  -            !FilenameUtils.fileExists(filename2));
  +//1.0        assertTrue(
  +//1.0            "Second test file does not exist",
  +//1.0            !FilenameUtils.fileExists(filename2));
   
           FileUtils.writeStringToFile(new File(filename2), filename, "UTF-8");
  -        assertTrue("Second file was written", FilenameUtils.fileExists(filename2));
  +//1.0        assertTrue("Second file was written", FilenameUtils.fileExists(filename2));
   
           String file2contents = FileUtils.readFileToString(new File(filename2), "UTF-8");
           assertTrue(
               "Second file's contents correct",
               FileUtils.readFileToString(new File(filename2), "UTF-8").equals(file2contents));
   
  -        FilenameUtils.fileDelete(filename2);
  -        assertTrue(
  -            "Second test file does not exist",
  -            !FilenameUtils.fileExists(filename2));
  +          new File(filename2).delete();   // remove after 1.0
  +//1.0        FilenameUtils.fileDelete(filename2);
  +//1.0        assertTrue(
  +//1.0            "Second test file does not exist",
  +//1.0            !FilenameUtils.fileExists(filename2));
   
           String contents = FileUtils.readFileToString(new File(filename), "UTF-8");
           assertTrue("FileUtils.fileRead()", contents.equals("This is a test"));
  
  
  

---------------------------------------------------------------------
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