diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/datetime.scm | 7 | ||||
-rw-r--r-- | tests/param.scm (renamed from tests/prop.scm) | 2 | ||||
-rw-r--r-- | tests/recurrence-rule.scm | 15 | ||||
-rw-r--r-- | tests/recurring.scm | 5 | ||||
-rw-r--r-- | tests/rrule-parse.scm | 13 | ||||
-rwxr-xr-x | tests/run-tests.scm | 2 |
6 files changed, 6 insertions, 38 deletions
diff --git a/tests/datetime.scm b/tests/datetime.scm index ee25ca9d..0cbb130d 100644 --- a/tests/datetime.scm +++ b/tests/datetime.scm @@ -120,11 +120,12 @@ ;; #2018-01-17T08:00:00))) -;; TODO +;; NOTE ;; at the time of writing this returns #2020-02-00 ;; The general question is, how is the last in a month handled? -;; (test-equal -;; (date+ #2019-12-31 (date month: 1))) +(test-equal + #2020-01-31 + (date+ #2019-12-31 (date month: 1))) (test-assert (leap-year? 2020)) diff --git a/tests/prop.scm b/tests/param.scm index cec0a8e2..ad690e61 100644 --- a/tests/prop.scm +++ b/tests/param.scm @@ -1,5 +1,3 @@ -;;; TODO rename this file to param.scm - (((vcomponent base) param prop* parameters) ((vcomponent parse) parse-calendar) ((util) sort*)) diff --git a/tests/recurrence-rule.scm b/tests/recurrence-rule.scm deleted file mode 100644 index 58daaa9b..00000000 --- a/tests/recurrence-rule.scm +++ /dev/null @@ -1,15 +0,0 @@ -(((vcomponent recurrence parse) parse-recurrence-rule) - ((vcomponent recurrence internal) - make-recur-rule weekdays intervals) - ((datetime) mon)) - - -(test-equal - (make-recur-rule freq: 'DAILY wkst: mon interval: 1) - (parse-recurrence-rule "FREQ=DAILY")) - -(test-equal - (make-recur-rule freq: 'WEEKLY wkst: mon interval: 1) - (parse-recurrence-rule "FREQ=WEEKLY")) - -;; TODO more tests diff --git a/tests/recurring.scm b/tests/recurring.scm index a6b60dc7..a3f98027 100644 --- a/tests/recurring.scm +++ b/tests/recurring.scm @@ -6,6 +6,7 @@ ((vcomponent recurrence) generate-recurrence-set)) ;;; Test that basic recurrence works +;;; also see the neighbour test file recurrence.scm for more tests. (define ev (call-with-input-string @@ -78,10 +79,6 @@ END:VEVENT" (test-assert "weekly 10-12" (stream-car (generate-recurrence-set ev))) -;;; TODO, also test: -;;; - limited repetition -;;; - weird rules - (define ev (call-with-input-string "BEGIN:VEVENT diff --git a/tests/rrule-parse.scm b/tests/rrule-parse.scm index c10266aa..f1d02d27 100644 --- a/tests/rrule-parse.scm +++ b/tests/rrule-parse.scm @@ -11,8 +11,6 @@ (test-equal (make-recur-rule freq: 'HOURLY count: 3 interval: 1 wkst: mon) (parse-recurrence-rule "FREQ=HOURLY;COUNT=3")) -;;; TODO write tests for these cases - (parameterize ((warnings-are-errors #t) (warning-handler identity)) ; silence warnings (test-error "Invalid FREQ" 'warning @@ -24,14 +22,3 @@ (test-error "Invalid COUNT" 'wrong-type-argument (parse-recurrence-rule "FREQ=HOURLY;COUNT=err")) ) - ; TODO this error seems to have an error -;; => #<<recur-rule> freq: #<<recur-rule> freq: #f until: #f count: #f interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> until: #f count: 3 interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> -;; ERR unfulfilled-constraint [ERR] doesn't fulfill constraint of type [FREQ], ignoring - -;; => #<<recur-rule> freq: HOURLY until: #f count: #f interval: 1 -;; bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f -;; byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> -;; ERR invalid-value [#f] for key [COUNT], ignoring. - -;; => #<<recur-rule> freq: HOURLY until: #f count: #<<recur-rule> freq: HOURLY until: #f count: #f interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> -;; ERR unfulfilled-constraint [-1] doesn't fulfill constraint of type [COUNT], ignoring diff --git a/tests/run-tests.scm b/tests/run-tests.scm index d2b86828..7eb0bb73 100755 --- a/tests/run-tests.scm +++ b/tests/run-tests.scm @@ -56,7 +56,7 @@ (for skip in to-skip (test-skip skip))) -;; TODO test-group fails if called before any test begin, since +;; NOTE test-group fails if called before any test begin, since ;; (test-runner-current) needs to be a test-runner (dead or not), ;; but is initially bound to #f. (test-begin "tests") |