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

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

[elpa] externals/assess 3f89d8601f 15/95: Port tests to sisyphus with-te


From: ELPA Syncer
Subject: [elpa] externals/assess 3f89d8601f 15/95: Port tests to sisyphus with-temp-buffers.
Date: Tue, 19 Jul 2022 15:57:29 -0400 (EDT)

branch: externals/assess
commit 3f89d8601f3883689d34d94e118db16182c80b04
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Port tests to sisyphus with-temp-buffers.
---
 test/sisyphus-test.el | 53 +++++++++++++++++++++------------------------------
 1 file changed, 22 insertions(+), 31 deletions(-)

diff --git a/test/sisyphus-test.el b/test/sisyphus-test.el
index 74dd11a69c..a0edcc5574 100644
--- a/test/sisyphus-test.el
+++ b/test/sisyphus-test.el
@@ -98,39 +98,30 @@ This also tests the advice on string=."
           "hello")))))))
 
 (ert-deftest buffer= ()
-  (let (a)
-    (with-temp-buffer
-      (setq a (current-buffer))
-      (insert "hello")
-      (with-temp-buffer
-        (insert "hello")
+  (sisyphus-with-temp-buffers
+      ((a
+        (insert "hello"))
+       (b
+        (insert "hello")))
+    (should
+     (sisyphus-buffer= a b)))
+  (sisyphus-with-temp-buffers
+      ((a
+        (insert "hello"))
+       (b
+        (insert "goodbye")))
+    (should-not
+     (sisyphus-buffer=
+      a b)))
+  (should
+   (sisyphus-with-temp-buffers
+       ((a (insert "hello"))
+        (b (insert "goodbye")))
+     (sisyphus-test--explanation
+      (lambda ()
         (should
          (sisyphus-buffer=
-          (current-buffer)
-          a)))))
-  (let (a)
-    (with-temp-buffer
-      (setq a (current-buffer))
-      (insert "hello")
-      (with-temp-buffer
-        (insert "goodbye")
-        (should-not
-         (sisyphus-buffer=
-          (current-buffer)
-          a)))))
-  (should
-   (let (a b)
-     (with-temp-buffer
-       (setq a (current-buffer))
-       (insert "hello")
-       (with-temp-buffer
-         (setq b (current-buffer))
-         (insert "goodbye")
-         (sisyphus-test--explanation
-          (lambda ()
-            (should
-             (sisyphus-buffer=
-              a b)))))))))
+          a b)))))))
 
 (defvar sisyphus-test-hello.txt
   (relative-expand-file-name "../dev-resources/hello.txt"))



reply via email to

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