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

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

[elpa] externals/lentic e1941d0773 106/333: Easy mechanism to disable no


From: ELPA Syncer
Subject: [elpa] externals/lentic e1941d0773 106/333: Easy mechanism to disable noisy fails.
Date: Tue, 27 Feb 2024 13:00:13 -0500 (EST)

branch: externals/lentic
commit e1941d0773367ed290661ca5c3c8093d00f05c22
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Easy mechanism to disable noisy fails.
    
    This cute diff mechanism auto runs even if for expected-fail buffers
    which is irritating.
---
 test/linked-buffer-test.el | 69 ++++++++++++++++++++++++----------------------
 1 file changed, 36 insertions(+), 33 deletions(-)

diff --git a/test/linked-buffer-test.el b/test/linked-buffer-test.el
index bd50e9e11d..cf19bb33ec 100644
--- a/test/linked-buffer-test.el
+++ b/test/linked-buffer-test.el
@@ -20,39 +20,42 @@
 
 (defun linked-buffer-test-equal-loudly (a b)
   "Actually, this just tests equality and shouts if not."
-  (if (string= a b)
-      t
-    (message "Results:\n%s\n:Complete\nShouldbe:\n%s\nComplete:" 
cloned-results cloned-file)
-    (let* ((a-buffer
-            (generate-new-buffer "a"))
-           (b-buffer
-            (generate-new-buffer "b"))
-           (a-file
-            (make-temp-file
-             (buffer-name a-buffer)))
-           (b-file
-            (make-temp-file
-             (buffer-name b-buffer))))
-      (with-current-buffer
-          a-buffer
-        (insert a)
-        (write-file a-file))
-      (with-current-buffer
-          b-buffer
-        (insert b)
-        (write-file b-file))
-      (message "diff:%senddiff:"
-               (with-temp-buffer
-                 (call-process
-                  "diff"
-                  nil
-                  (current-buffer)
-                  nil
-                  "-c"
-                  a-file
-                  b-file)
-                 (buffer-string))))
-    nil))
+  ;; change this to t to disable noisy printout
+  (if t
+      (string= a b)
+    (if (string= a b)
+        t
+      (message "Results:\n%s\n:Complete\nShouldbe:\n%s\nComplete:" 
cloned-results cloned-file)
+      (let* ((a-buffer
+              (generate-new-buffer "a"))
+             (b-buffer
+              (generate-new-buffer "b"))
+             (a-file
+              (make-temp-file
+               (buffer-name a-buffer)))
+             (b-file
+              (make-temp-file
+               (buffer-name b-buffer))))
+        (with-current-buffer
+            a-buffer
+          (insert a)
+          (write-file a-file))
+        (with-current-buffer
+            b-buffer
+          (insert b)
+          (write-file b-file))
+        (message "diff:%senddiff:"
+                 (with-temp-buffer
+                   (call-process
+                    "diff"
+                    nil
+                    (current-buffer)
+                    nil
+                    "-c"
+                    a-file
+                    b-file)
+                   (buffer-string))))
+      nil)))
 
 (defun linked-buffer-test-clone-equal (init file cloned-file)
   (let ((cloned-file



reply via email to

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