emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/persist 326dc90 2/3: Update tests to changed semantics


From: Phillip Lord
Subject: [elpa] externals/persist 326dc90 2/3: Update tests to changed semantics of save
Date: Sat, 29 Jun 2019 11:34:30 -0400 (EDT)

branch: externals/persist
commit 326dc904639132e58912868b0b61b47ec8b7f383
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Update tests to changed semantics of save
---
 test/persist-tests.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/persist-tests.el b/test/persist-tests.el
index 411984a..bedf0ae 100644
--- a/test/persist-tests.el
+++ b/test/persist-tests.el
@@ -3,6 +3,7 @@
 
 
 (defmacro with-local-temp-persist (&rest body)
+  (declare (debug body))
   `(unwind-protect
        (let ((persist--directory-location "./persist/")
              (persist--symbols nil))
@@ -29,10 +30,13 @@
      (persist-symbol sym 10)
      (persist-save sym)
      (should t)
+     (should-not (file-exists-p (persist--file-location sym)))
+     (set sym 20)
+     (persist-save sym)
      (should (file-exists-p (persist--file-location sym)))
      (should
       (string-match-p
-       "10"
+       "20"
        (with-temp-buffer
          (insert-file-contents (persist--file-location sym))
          (buffer-string))))
@@ -43,7 +47,8 @@
   (with-local-temp-persist
    (let ((sym (cl-gensym)))
      (set sym 10)
-     (persist-symbol sym 10)
+     ;; set this different to force save
+     (persist-symbol sym 1)
      (persist-save sym)
      (should (equal 10 (symbol-value sym)))
      (set sym 30)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]