-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmaildir-tests.el
41 lines (35 loc) · 1.03 KB
/
maildir-tests.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
;;; tests for maildir
(require 'maildir)
(ert-deftest maildir/split-string ()
(should
(equal
(maildir/split-string "\\(\n\\)[^ ]" "blah\nblah" 1)
(list "blah" "blah"))))
(ert-deftest maildir--index-header-parse-date()
"Test the index header parsing of dates."
(should
(equal
'(date . "20110726135116")
(maildir--index-header-parse
(cons 'date "Tue, 26 Jul 2011 15:51:16 +0300")))))
(ert-deftest maildir--index-header-parse-to()
"Test the index header parsing of the to address."
(should
(equal
`(to . ((address . "[email protected]")
(name . "Nic Ferrier")))
(maildir--index-header-parse
(cons 'to "\"Nic Ferrier\" <[email protected]>")))))
(ert-deftest maildir/calendar-month-name->number ()
"Test the calendar conversion stuff."
(should
(equal
(maildir/calendar-month-name->number "Jan")
1))
(should
(equal
(maildir/calendar-month-name->number "January")
1))
(should-not
(maildir/calendar-month-name->number "Doh")))
;;; tests.el ends here