commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/io/src/test/org/apache/commons/io FilenameUtilsTestCase.java
Date Sun, 31 Oct 2004 00:03:03 GMT
scolebourne    2004/10/30 17:03:03

  Modified:    io/src/test/org/apache/commons/io FilenameUtilsTestCase.java
  Log:
  More tests
  
  Revision  Changes    Path
  1.19      +7 -1      jakarta-commons/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
  
  Index: FilenameUtilsTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FilenameUtilsTestCase.java	30 Oct 2004 23:59:17 -0000	1.18
  +++ FilenameUtilsTestCase.java	31 Oct 2004 00:03:03 -0000	1.19
  @@ -287,7 +287,9 @@
       public void testIsExtension() {
           assertEquals(false, FilenameUtils.isExtension(null, (String) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", (String) null));
  +        assertEquals(true, FilenameUtils.isExtension("file", (String) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", ""));
  +        assertEquals(true, FilenameUtils.isExtension("file", ""));
           assertEquals(true, FilenameUtils.isExtension("file.txt", "txt"));
           assertEquals(false, FilenameUtils.isExtension("file.txt", "rtf"));
           
  @@ -321,9 +323,11 @@
       public void testIsExtensionArray() {
           assertEquals(false, FilenameUtils.isExtension(null, (String[]) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", (String[]) null));
  +        assertEquals(true, FilenameUtils.isExtension("file", (String[]) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", new String[0]));
           assertEquals(true, FilenameUtils.isExtension("file.txt", new String[] {"txt"}));
           assertEquals(false, FilenameUtils.isExtension("file.txt", new String[] {"rtf"}));
  +        assertEquals(true, FilenameUtils.isExtension("file", new String[] {"rtf", ""}));
           assertEquals(true, FilenameUtils.isExtension("file.txt", new String[] {"rtf", "txt"}));
           
           assertEquals(false, FilenameUtils.isExtension("a/b/file.txt", (String[]) null));
  @@ -362,9 +366,11 @@
       public void testIsExtensionCollection() {
           assertEquals(false, FilenameUtils.isExtension(null, (Collection) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", (Collection) null));
  +        assertEquals(true, FilenameUtils.isExtension("file", (Collection) null));
           assertEquals(false, FilenameUtils.isExtension("file.txt", new ArrayList()));
           assertEquals(true, FilenameUtils.isExtension("file.txt", new ArrayList(Arrays.asList(new
String[] {"txt"}))));
           assertEquals(false, FilenameUtils.isExtension("file.txt", new ArrayList(Arrays.asList(new
String[] {"rtf"}))));
  +        assertEquals(true, FilenameUtils.isExtension("file", new ArrayList(Arrays.asList(new
String[] {"rtf", ""}))));
           assertEquals(true, FilenameUtils.isExtension("file.txt", new ArrayList(Arrays.asList(new
String[] {"rtf", "txt"}))));
           
           assertEquals(false, FilenameUtils.isExtension("a/b/file.txt", (Collection) null));
  
  
  

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