aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/lisp/calendar/icalendar-tests.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el
index 2fecabcd75b..617e8869897 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -57,17 +57,16 @@
57 57
58(ert-deftest icalendar--create-uid () 58(ert-deftest icalendar--create-uid ()
59 "Test for `icalendar--create-uid'." 59 "Test for `icalendar--create-uid'."
60 (let* ((icalendar-uid-format "xxx-%t-%c-%h-%u-%s") 60 (let* ((icalendar-uid-format "xxx-%c-%h-%u-%s")
61 (icalendar--uid-count 77) 61 (icalendar--uid-count 77)
62 (entry-full "30.06.1964 07:01 blahblah") 62 (entry-full "30.06.1964 07:01 blahblah")
63 (hash (format "%d" (abs (sxhash entry-full)))) 63 (hash (format "%d" (abs (sxhash entry-full))))
64 (contents "DTSTART:19640630T070100\nblahblah") 64 (contents "DTSTART:19640630T070100\nblahblah")
65 (username (or user-login-name "UNKNOWN_USER"))) 65 (username (or user-login-name "UNKNOWN_USER")))
66 (cl-letf (((symbol-function 'current-time) (lambda () '(1 2 3)))) 66 (should (= 77 icalendar--uid-count))
67 (should (= 77 icalendar--uid-count)) 67 (should (string= (concat "xxx-77-" hash "-" username "-19640630")
68 (should (string= (concat "xxx-123-77-" hash "-" username "-19640630") 68 (icalendar--create-uid entry-full contents)))
69 (icalendar--create-uid entry-full contents))) 69 (should (= 78 icalendar--uid-count))
70 (should (= 78 icalendar--uid-count)))
71 (setq contents "blahblah") 70 (setq contents "blahblah")
72 (setq icalendar-uid-format "yyy%syyy") 71 (setq icalendar-uid-format "yyy%syyy")
73 (should (string= (concat "yyyDTSTARTyyy") 72 (should (string= (concat "yyyDTSTARTyyy")