File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 - Pay football practice (every month)
1717 - Martha's birthday (every 05-24)
1818 - Meeting with Jack (on 2022-05-03)
19+ - Review logs (every last day)
1920 ``` )
2021 (def result (schedule_parser/parse schedule-string ))
2122 (def scheduled-tasks (result :tasks ))
22- (is (= 6 (length scheduled-tasks )))
23+ (is (= 7 (length scheduled-tasks )))
2324 (let [task (scheduled-tasks 0 )]
2425 (is (= " Weekly Meeting" (task :title )))
2526 (is (= false (task :done )))
2627 (is (= " every Tuesday" (task :schedule ))))
2728 (let [task (scheduled-tasks 1 )]
2829 (is (= " Puzzle Storm on Lichess" (task :title )))
29- (is (= false (task :done )))
3030 (is (= " every day" (task :schedule ))))
3131 (let [task (scheduled-tasks 5 )]
3232 (is (= " Meeting with Jack" (task :title )))
33- (is (= false (task :done )))
34- (is (= " on 2022-05-03" (task :schedule )))))
33+ (is (= " on 2022-05-03" (task :schedule ))))
34+ (let [task (scheduled-tasks 6 )]
35+ (is (= " Review logs" (task :title )))
36+ (is (= " every last day" (task :schedule )))))
3537
3638(deftest parse-schedule-when-schedule-can-not-be-parsed
3739 (def schedule-string
You can’t perform that action at this time.
0 commit comments