diff options
author | Ulf Jasper <ulf.jasper@web.de> | 2008-10-31 18:48:23 +0000 |
---|---|---|
committer | Ulf Jasper <ulf.jasper@web.de> | 2008-10-31 18:48:23 +0000 |
commit | aad81014a9d9e3e6fc0960e8e3825c839a0a4123 (patch) | |
tree | 4ae80331c12c350f99d386e39a2476c9628f92e2 /test/icalendar-testsuite.el | |
parent | ca2d101f5e3d42ed40b690ba86f46fb32e80a820 (diff) | |
download | emacs-aad81014a9d9e3e6fc0960e8e3825c839a0a4123.tar.gz |
icalendar: uid-creation improved
Diffstat (limited to 'test/icalendar-testsuite.el')
-rw-r--r-- | test/icalendar-testsuite.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/icalendar-testsuite.el b/test/icalendar-testsuite.el index fcfef918ad6..88cb128cbd9 100644 --- a/test/icalendar-testsuite.el +++ b/test/icalendar-testsuite.el @@ -51,7 +51,8 @@ (icalendar-testsuite--test-first-weekday-of-year) (icalendar-testsuite--test-datestring-to-isodate) (icalendar-testsuite--test-datetime-to-diary-date) - (icalendar-testsuite--test-calendar-style)) + (icalendar-testsuite--test-calendar-style) + (icalendar-testsuite--test-create-uid)) (defun icalendar-testsuite--test-format-ical-event () "Test `icalendar--format-ical-event'." @@ -221,6 +222,19 @@ END:VEVENT (assert (eq (icalendar--date-style) 'american)) (setq calendar-date-style cds))) +(defun icalendar-testsuite--test-create-uid () + "Test method for `icalendar--create-uid'." + (let (t-ct + (icalendar--uid-count 77)) + ;; FIXME! If a test fails 'current-time is screwed. FIXME! + (fset 't-ct (symbol-function 'current-time)) + (fset 'current-time (lambda () '(1 2 3))) + (assert (= 77 icalendar--uid-count)) + (assert (string= "emacs12378" (icalendar--create-uid))) + (assert (= 78 icalendar--uid-count)) + (fset 'current-time (symbol-function 't-ct)) + )) + ;; ====================================================================== ;; Test methods for exporting from diary to icalendar ;; ====================================================================== |