New feature: toggle visibility of mime buttons.
[more-wl.git] / tests / test-wl-util.el
blob1efc1bf7ce7eb24fea9f1e95311c4d058cc58853
1 (require 'lunit)
2 (require 'wl-util)
4 (luna-define-class test-wl-util (lunit-test-case))
6 (luna-define-method test-wl-parse-addresses-1 ((case test-wl-util))
7 (lunit-assert
8 (equal
9 '("foo@example.com" "bar@example.com")
10 (wl-parse-addresses "foo@example.com, bar@example.com"))))
13 ;; Message-ID
14 (luna-define-method test-wl-unique-id ((case test-wl-util))
15 (lunit-assert
16 (not
17 (string= (wl-unique-id)
18 (progn (sleep-for 1) (wl-unique-id))))))
20 (luna-define-method test-wl-unique-id-by-user ((case test-wl-util))
21 (lunit-assert
22 (let (user-login-name)
23 (not
24 (string= (progn (setq user-login-name "_alice") (wl-unique-id))
25 (progn (setq user-login-name "_bob") (wl-unique-id)))))))
28 (luna-define-method test-wl-inverse-alist ((case test-wl-util))
29 (lunit-assert
30 (equal
31 '((cc c) (aa a))
32 (wl-inverse-alist '(a c) '((a . aa) (a . bb) (c . cc))))))