From 6d5684cdf6886a46ee993c8ec986d306472cd5b0 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 19 Jul 2011 14:41:30 -0700 Subject: Don't require FREQ to come first The definition of "recur" in 4.3.10 suggests that FREQ must come first, but the description is really just trying to say that FREQ is mandatory. The text makes it clear that there is no ordering on rule parts. This removes the explicit test, and updates the set of test rules. Change-Id: I908ae388456a7df2d12a0c18a2174af8f95ec421 --- tests/src/com/android/calendarcommon/EventRecurrenceTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/src/com/android') diff --git a/tests/src/com/android/calendarcommon/EventRecurrenceTest.java b/tests/src/com/android/calendarcommon/EventRecurrenceTest.java index 1bddc61..35777eb 100644 --- a/tests/src/com/android/calendarcommon/EventRecurrenceTest.java +++ b/tests/src/com/android/calendarcommon/EventRecurrenceTest.java @@ -711,19 +711,20 @@ public class EventRecurrenceTest extends TestCase { "FREQ=SECONDLY;BYSECOND=0,15,59", "FREQ=MINUTELY;BYMINUTE=0,15,59", "FREQ=HOURLY;BYHOUR=+0,+15,+23", - "FREQ=DAILY;X-WHATEVER=blah", // fails on old parser - //"freq=daily;wkst=su", // fails on old parser + "INTERVAL=4;FREQ=YEARLY", + "FREQ=DAILY;X-WHATEVER=blah", + //"freq=daily;wkst=su", // mixed case currently not allowed }; /** The parser must reject these. */ private static final String[] BAD_RRULES = { - "INTERVAL=4;FREQ=YEARLY", // FREQ must come first "FREQ=MONTHLY;FREQ=MONTHLY", // can't specify twice "FREQ=MONTHLY;COUNT=1;COUNT=1", // can't specify twice "FREQ=SECONDLY;BYSECOND=60", // range "FREQ=MINUTELY;BYMINUTE=-1", // range "FREQ=HOURLY;BYHOUR=24", // range "FREQ=YEARLY;BYMONTHDAY=0", // zero not valid + "BYMONTHDAY=1", // must specify FREQ //"FREQ=YEARLY;COUNT=1;UNTIL=12345", // can't have both COUNT and UNTIL //"FREQ=DAILY;UNTIL=19970829T021400e", // invalid date }; -- cgit v1.2.3