[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/test/icalendar-testsuite.el,v
From: |
Ulf Jasper |
Subject: |
[Emacs-diffs] Changes to emacs/test/icalendar-testsuite.el,v |
Date: |
Fri, 31 Oct 2008 18:48:23 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Ulf Jasper <u11> 08/10/31 18:48:23
Index: icalendar-testsuite.el
===================================================================
RCS file: /sources/emacs/emacs/test/icalendar-testsuite.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- icalendar-testsuite.el 24 May 2008 02:24:57 -0000 1.3
+++ icalendar-testsuite.el 31 Oct 2008 18:48:23 -0000 1.4
@@ -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 @@
(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
;; ======================================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/test/icalendar-testsuite.el,v,
Ulf Jasper <=