You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/02/29 21:13:58 UTC

svn commit: r1295250 - /commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Author: sebb
Date: Wed Feb 29 20:13:57 2012
New Revision: 1295250

URL: http://svn.apache.org/viewvc?rev=1295250&view=rev
Log:
Add disabled test for NET-446

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?rev=1295250&r1=1295249&r2=1295250&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java Wed Feb 29 20:13:57 2012
@@ -420,6 +420,15 @@ public class FTPTimestampParserImplTest 
         }
     }
 
+    // This test currently fails, because we assume that short dates are +-6months when parsing Feb 29
+    public void DISABLEDtestNET446() throws Exception {
+        GregorianCalendar server = new GregorianCalendar(2001, Calendar.JANUARY, 1, 12, 0);
+        // Note: we use a known leap year for the target date to avoid rounding up
+        GregorianCalendar input = new GregorianCalendar(2000, Calendar.FEBRUARY,29);
+        GregorianCalendar expected = new GregorianCalendar(2000, Calendar.FEBRUARY,29);
+        checkShortParse("Feb 29th 2000", server, input, expected);
+    }
+
     public void testParseDec31Lenient() throws Exception {
         GregorianCalendar now = new GregorianCalendar(2007, Calendar.DECEMBER, 30, 12, 0);
         checkShortParse("2007-12-30",now,now); // should always work