diff options
| author | Ulf Jasper | 2008-10-31 18:48:23 +0000 |
|---|---|---|
| committer | Ulf Jasper | 2008-10-31 18:48:23 +0000 |
| commit | aad81014a9d9e3e6fc0960e8e3825c839a0a4123 (patch) | |
| tree | 4ae80331c12c350f99d386e39a2476c9628f92e2 | |
| parent | ca2d101f5e3d42ed40b690ba86f46fb32e80a820 (diff) | |
| download | emacs-aad81014a9d9e3e6fc0960e8e3825c839a0a4123.tar.gz emacs-aad81014a9d9e3e6fc0960e8e3825c839a0a4123.zip | |
icalendar: uid-creation improved
| -rw-r--r-- | test/ChangeLog | 6 | ||||
| -rw-r--r-- | test/icalendar-testsuite.el | 16 |
2 files changed, 21 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index ed05b07384f..92251f361f8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-10-31 Ulf Jasper <ulf@web.de> | ||
| 2 | |||
| 3 | * icalendar-testsuite.el (icalendar-testsuite--run-function-tests): | ||
| 4 | Added `icalendar-testsuite--test-create-uid'. | ||
| 5 | (icalendar-testsuite--test-create-uid): New. | ||
| 6 | |||
| 1 | 2008-06-14 Ulf Jasper <ulf.jasper@web.de> | 7 | 2008-06-14 Ulf Jasper <ulf.jasper@web.de> |
| 2 | 8 | ||
| 3 | * newsticker-testsuite.el: New file. | 9 | * newsticker-testsuite.el: New file. |
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 @@ | |||
| 51 | (icalendar-testsuite--test-first-weekday-of-year) | 51 | (icalendar-testsuite--test-first-weekday-of-year) |
| 52 | (icalendar-testsuite--test-datestring-to-isodate) | 52 | (icalendar-testsuite--test-datestring-to-isodate) |
| 53 | (icalendar-testsuite--test-datetime-to-diary-date) | 53 | (icalendar-testsuite--test-datetime-to-diary-date) |
| 54 | (icalendar-testsuite--test-calendar-style)) | 54 | (icalendar-testsuite--test-calendar-style) |
| 55 | (icalendar-testsuite--test-create-uid)) | ||
| 55 | 56 | ||
| 56 | (defun icalendar-testsuite--test-format-ical-event () | 57 | (defun icalendar-testsuite--test-format-ical-event () |
| 57 | "Test `icalendar--format-ical-event'." | 58 | "Test `icalendar--format-ical-event'." |
| @@ -221,6 +222,19 @@ END:VEVENT | |||
| 221 | (assert (eq (icalendar--date-style) 'american)) | 222 | (assert (eq (icalendar--date-style) 'american)) |
| 222 | (setq calendar-date-style cds))) | 223 | (setq calendar-date-style cds))) |
| 223 | 224 | ||
| 225 | (defun icalendar-testsuite--test-create-uid () | ||
| 226 | "Test method for `icalendar--create-uid'." | ||
| 227 | (let (t-ct | ||
| 228 | (icalendar--uid-count 77)) | ||
| 229 | ;; FIXME! If a test fails 'current-time is screwed. FIXME! | ||
| 230 | (fset 't-ct (symbol-function 'current-time)) | ||
| 231 | (fset 'current-time (lambda () '(1 2 3))) | ||
| 232 | (assert (= 77 icalendar--uid-count)) | ||
| 233 | (assert (string= "emacs12378" (icalendar--create-uid))) | ||
| 234 | (assert (= 78 icalendar--uid-count)) | ||
| 235 | (fset 'current-time (symbol-function 't-ct)) | ||
| 236 | )) | ||
| 237 | |||
| 224 | ;; ====================================================================== | 238 | ;; ====================================================================== |
| 225 | ;; Test methods for exporting from diary to icalendar | 239 | ;; Test methods for exporting from diary to icalendar |
| 226 | ;; ====================================================================== | 240 | ;; ====================================================================== |