ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs AvailableTest.java
Date Thu, 03 May 2001 11:16:56 GMT
bodewig     01/05/03 04:16:55

  Modified:    src/etc/testcases/taskdefs available.xml
               src/testcases/org/apache/tools/ant/taskdefs
                        AvailableTest.java
  Log:
  fix testcase 13 for available.
  
  Revision  Changes    Path
  1.7       +5 -0      jakarta-ant/src/etc/testcases/taskdefs/available.xml
  
  Index: available.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/available.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- available.xml	2001/05/03 07:41:11	1.6
  +++ available.xml	2001/05/03 11:16:50	1.7
  @@ -65,6 +65,11 @@
   
     <target name="test13">
       <available property="test" 
  +               file="" type="file" />
  +  </target>
  +
  +  <target name="test13b">
  +    <available property="test" 
                  file=""/>
     </target>
   
  
  
  
  1.4       +11 -5     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/AvailableTest.java
  
  Index: AvailableTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/AvailableTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvailableTest.java	2001/05/01 11:41:05	1.3
  +++ AvailableTest.java	2001/05/03 11:16:53	1.4
  @@ -127,22 +127,28 @@
       // All three specified but class missing -> null
       public void test11() { 
           executeTarget("test11");
  -        assertEquals(null, project.getProperty("test"));
  +        assertNull(project.getProperty("test"));
       }
   
       // Specified property-name is "" -> true
       public void test12() { 
           executeTarget("test12");
  -        assertEquals(null, project.getProperty("test"));
  +        assertNull(project.getProperty("test"));
           assertEquals("true", project.getProperty(""));
       }
   
       // Specified file is "" -> invalid files do not exist
       public void test13() { 
           executeTarget("test13");
  -        assertEquals(null, project.getProperty("test"));
  +        assertNull(project.getProperty("test"));
       }
   
  +    // Specified file is "" actually a directory, so it should pass
  +    public void test13b() { 
  +        executeTarget("test13b");
  +        assertEquals("true", project.getProperty("test"));
  +    }
  +
       // Specified resource is "" -> can such a thing exist?
       /*
        * returns non null IBM JDK 1.3 Linux
  @@ -155,7 +161,7 @@
       // Specified class is "" -> can not exist
       public void test15() { 
           executeTarget("test15");
  -        assertEquals(null, project.getProperty("test"));
  +        assertNull(project.getProperty("test"));
       }
   
       // Specified dir is "" -> this is the current directory and should
  @@ -175,6 +181,6 @@
       // Specified dir is "../this_dir_should_never_exist" -> null
       public void test18() { 
           executeTarget("test18");
  -        assertEquals(null, project.getProperty("test"));
  +        assertNull(project.getProperty("test"));
       }
   }
  
  
  

Mime
View raw message