: java.util.regex.Pattern pattern =
java.util.regex.Pattern.compile("[A-Z][a-z]{1,2}, [0-9]{1,2} [A-Z][a-z]{2}
[0-9]{4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2} [A-Z]{2,4}");
: Date date = new Date();
: String formatedDate =
DateFormater.formatDate(date,DateFormater.HTTP_HEADER_DATE_FORMAT);
: assertTrue(pattern.matcher(formatedDate).matches()); // THIS
ASSERT FAILS
it doesn't fail for me, but it does look very TimeZone sensitive, the
pattern the formatedDate is tested against doesn't look like it would be
too freindly to non-US timezones.
a simple start is to get the test to be more verbose on failure ... i just
tweaked the asert to tell you exactly what string didn't match the pattern
if it fails (hmm.. someone else just made it write the date to stdout ..
now we'll know twice!)
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]