* Check only using specified lenient future dates setting
*/
private void checkShortParse(String msg, Calendar now, Calendar input, boolean lenient) throws ParseException {
FTPTimestampParserImpl parser = new FTPTimestampParserImpl();
parser.setLenientFutureDates(lenient);
Format shortFormat = parser.getRecentDateFormat(); // It's expecting this format
Format longFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
final String shortDate = shortFormat.format(input.getTime());
Calendar output=parser.parseTimestamp(shortDate, now);
int outyear = output.get(Calendar.YEAR);
int outdom = output.get(Calendar.DAY_OF_MONTH);
int outmon = output.get(Calendar.MONTH);
int inyear = input.get(Calendar.YEAR);
int indom = input.get(Calendar.DAY_OF_MONTH);
int inmon = input.get(Calendar.MONTH);
if (indom != outdom || inmon != outmon || inyear != outyear){
fail("Test: '"+msg+"' Server="+longFormat.format(now.getTime())
+". Failed to parse "+shortDate
+". Actual "+longFormat.format(output.getTime())
+". Expected "+longFormat.format(input.getTime()));
}
}