ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/etc/testcases/taskdefs touch.xml
Date Sun, 08 Feb 2004 20:48:01 GMT
antoine     2004/02/08 12:48:01

  Modified:    src/testcases/org/apache/tools/ant/taskdefs TouchTest.java
               src/etc/testcases/taskdefs touch.xml
  Log:
  Make touchtest pass on Win2
  Make touchtest pass on Win2K / FAT
  Dates earlier than 1990 seem not to work for me
  as last modified dates of files
  
  Revision  Changes    Path
  1.6       +5 -5      ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java
  
  Index: TouchTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TouchTest.java	4 Feb 2004 20:38:02 -0000	1.5
  +++ TouchTest.java	8 Feb 2004 20:48:01 -0000	1.6
  @@ -69,7 +69,7 @@
        * verify that the millis test sets things up
        */
       public void testMillis() {
  -        touchFile("testMillis", 1234567);
  +        touchFile("testMillis", 662256000000L);
       }
   
       /**
  @@ -84,22 +84,22 @@
       /**
        * verify that the millis test sets things up
        */
  -    public void test1970() {
  -        touchFile("test1970", 0);
  +    public void test2000() {
  +        touchFile("test2000", 946080000000L);
       }
   
       /**
        * test the file list
        */
       public void testFilelist() {
  -        touchFile("testFilelist", 100000);
  +        touchFile("testFilelist", 662256000000L);
       }
   
       /**
        * test the file set
        */
       public void testFileset() {
  -        touchFile("testFileset", 200000);
  +        touchFile("testFileset", 946080000000L);
       }
   
       /**
  
  
  
  1.3       +13 -5     ant/src/etc/testcases/taskdefs/touch.xml
  
  Index: touch.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/touch.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- touch.xml	7 Jan 2004 17:49:37 -0000	1.2
  +++ touch.xml	8 Feb 2004 20:48:01 -0000	1.3
  @@ -18,21 +18,29 @@
     </target>
     
     <target name="testMillis">
  -    <touch file="touchtest" millis="1234567" />
  +    <!-- this one is about 21 years after the epoch -->
  +    <!-- less than 20 years after the epoch, test does not pass on my Win2K/FAT -->
  +    <!-- Antoine February 8, 2004 -->
  +    <!-- see http://developer.java.sun.com/developer/bugParade/bugs/4177432.html -->
  +    <!-- and http://developer.java.sun.com/developer/bugParade/bugs/4697792.html -->
  +    <!-- not sure why -->
  +    <touch file="touchtest" millis="662256000000" />
     </target>
     
  -  <target name="test1970">
  -    <touch file="touchtest" millis="0" />
  +  <target name="test2000">
  +    <!-- this number of milliseconds is 30 * 365 * 24 * 3600 * 1000 -->
  +    <!-- so the corresponding time is at the end of 1999 -->
  +    <touch file="touchtest" millis="946080000000" />
     </target>
     
     <target name="testFilelist">
  -    <touch millis="100000" >
  +    <touch millis="662256000000" >
         <filelist dir="." files="touchtest"/>
       </touch>
     </target>
   
     <target name="testFileset" depends="testNow">
  -    <touch millis="200000" >
  +    <touch millis="946080000000" >
         <fileset dir="." includes="touchtest"/>
       </touch>
     </target>
  
  
  

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


Mime
View raw message