[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3937b5b: Fix icalendar tests to match new behavior
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 3937b5b: Fix icalendar tests to match new behavior |
Date: |
Sat, 15 Sep 2018 17:11:14 -0400 (EDT) |
branch: master
commit 3937b5b52af3eb78101dc385ac8dfe7a36e2e624
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix icalendar tests to match new behavior
* test/lisp/calendar/icalendar-tests.el (icalendar--create-uid):
Do not intrude into or rely upon undocumented internal
implementation details of icalendar--create-uid.
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2018-09/msg00660.html
---
test/lisp/calendar/icalendar-tests.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/test/lisp/calendar/icalendar-tests.el
b/test/lisp/calendar/icalendar-tests.el
index 2fecabc..617e886 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -57,17 +57,16 @@
(ert-deftest icalendar--create-uid ()
"Test for `icalendar--create-uid'."
- (let* ((icalendar-uid-format "xxx-%t-%c-%h-%u-%s")
+ (let* ((icalendar-uid-format "xxx-%c-%h-%u-%s")
(icalendar--uid-count 77)
(entry-full "30.06.1964 07:01 blahblah")
(hash (format "%d" (abs (sxhash entry-full))))
(contents "DTSTART:19640630T070100\nblahblah")
(username (or user-login-name "UNKNOWN_USER")))
- (cl-letf (((symbol-function 'current-time) (lambda () '(1 2 3))))
- (should (= 77 icalendar--uid-count))
- (should (string= (concat "xxx-123-77-" hash "-" username "-19640630")
- (icalendar--create-uid entry-full contents)))
- (should (= 78 icalendar--uid-count)))
+ (should (= 77 icalendar--uid-count))
+ (should (string= (concat "xxx-77-" hash "-" username "-19640630")
+ (icalendar--create-uid entry-full contents)))
+ (should (= 78 icalendar--uid-count))
(setq contents "blahblah")
(setq icalendar-uid-format "yyy%syyy")
(should (string= (concat "yyyDTSTARTyyy")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3937b5b: Fix icalendar tests to match new behavior,
Paul Eggert <=