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

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

[elpa] externals/compat f1be1fbdeb: Don't test compat--proper-list-p-len


From: ELPA Syncer
Subject: [elpa] externals/compat f1be1fbdeb: Don't test compat--proper-list-p-length-signal prior to 26.1
Date: Sat, 5 Feb 2022 03:57:24 -0500 (EST)

branch: externals/compat
commit f1be1fbdebaa18930e03f81fec2d1dc82fde5347
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Don't test compat--proper-list-p-length-signal prior to 26.1
    
    The functionality of this compatibility function depends on the
    signalling of an error when a cycling list is detected.  Without this,
    the function never terminates and the tests time out.
---
 compat-tests.el | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index c7c297d74c..dd5f462f17 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -433,20 +433,21 @@ the compatibility function."
 
 (ert-deftest compat-proper-list-p-1 ()
   "Check if `compat--proper-list-p' was implemented correctly (>=26.1)."
-  (compat-test (proper-list-p compat--proper-list-p-length-signal)
-    (compat--should 0 ())                              ;empty list
-    (compat--should 1 '(1))                            ;single element
-    (compat--should 3 '(1 2 3))                        ;multiple elements
-    (compat--should nil '(1 . 2))                      ;cons
-    (compat--should nil '(1 2 . 3))                    ;dotted
-    (compat--should nil (let ((l (list 1 2 3)))                ;circular
-                          (setf (nthcdr 3 l) l)
-                          l))
-    (compat--should nil 1)                              ;non-lists
-    (compat--should nil "")
-    (compat--should nil "abc")
-    (compat--should nil [])
-    (compat--should nil [1 2 3])))
+  (unless (version< emacs-version "26")
+    (compat-test (proper-list-p compat--proper-list-p-length-signal)
+      (compat--should 0 ())                            ;empty list
+      (compat--should 1 '(1))                          ;single element
+      (compat--should 3 '(1 2 3))                      ;multiple elements
+      (compat--should nil '(1 . 2))                    ;cons
+      (compat--should nil '(1 2 . 3))                  ;dotted
+      (compat--should nil (let ((l (list 1 2 3)))              ;circular
+                            (setf (nthcdr 3 l) l)
+                            l))
+      (compat--should nil 1)                              ;non-lists
+      (compat--should nil "")
+      (compat--should nil "abc")
+      (compat--should nil [])
+      (compat--should nil [1 2 3]))))
 
 (ert-deftest compat-proper-list-p-2 ()
   "Check if `compat--proper-list-p' was implemented correctly (<25.3)."



reply via email to

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