◊(Local Yarn Code "Check-in [6034c1b0]")

Overview
Comment:Correct unit test in dates.rkt
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6034c1b0a42a0289c086c4b6344d2bceb9cb040362cb1eb3a3fc8c08b924f608
User & Date: joel on 2018-08-22 02:45:50
Other Links: manifest | tags
Context
2018-08-26
18:13
Implement basic SQLite caching (closes [ccce11c15]) check-in: 0b455f1f user: joel tags: trunk
2018-08-22
02:45
Correct unit test in dates.rkt check-in: 6034c1b0 user: joel tags: trunk
2018-08-12
16:31
Add ymd->dateformat and add unit tests check-in: 28ee8201 user: joel tags: trunk
Changes

Modified dates.rkt from [6947cc76] to [46a355ed].

40
41
42
43
44
45
46
47
48
49
50
  (check-equal? (ymd->english "2018-08-12") "August 12, 2018")
  (check-equal? (ymd->dateformat "2018-08-12" "d MMM YYYY") "12 Aug 2018")

  ;; How we handle weird input
  (check-equal? (ymd->english "2018-08-12 everything after 1st space ignored") "August 12, 2018")
  (check-equal? (ymd->english "2018-08 omitting the day") "August 1, 2018")
  (check-equal? (ymd->english "2018 omitting month and day") "January 1, 2018")
  (check-equal? (ymd->dateformat "2018-08-12") "123")

  ;; Stuff we just don't handle
  (check-exn exn:gregor:parse? (lambda () (ymd->english "2018-xyz"))))







|



40
41
42
43
44
45
46
47
48
49
50
  (check-equal? (ymd->english "2018-08-12") "August 12, 2018")
  (check-equal? (ymd->dateformat "2018-08-12" "d MMM YYYY") "12 Aug 2018")

  ;; How we handle weird input
  (check-equal? (ymd->english "2018-08-12 everything after 1st space ignored") "August 12, 2018")
  (check-equal? (ymd->english "2018-08 omitting the day") "August 1, 2018")
  (check-equal? (ymd->english "2018 omitting month and day") "January 1, 2018")
  (check-equal? (ymd->dateformat "2018-08-12" "123") "123")

  ;; Stuff we just don't handle
  (check-exn exn:gregor:parse? (lambda () (ymd->english "2018-xyz"))))