[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat e5f4a546ae 10/13: Fix duplicate test name issues
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat e5f4a546ae 10/13: Fix duplicate test name issues |
Date: |
Sun, 13 Mar 2022 19:57:35 -0400 (EDT) |
branch: externals/compat
commit e5f4a546ae1dcb463d8e67741712f8e655e84571
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Fix duplicate test name issues
---
compat-tests.el | 71 +++++++++++++++++++++++++++------------------------------
1 file changed, 34 insertions(+), 37 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 6e45b00c7e..9926aa9986 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -48,8 +48,8 @@
COMPAT is the name of the compatibility function the behaviour is
being compared against."
(lambda (result &rest args)
- (let ((real-test (intern (format "compat-%s-%04d-actual" name
compat-test-counter)))
- (comp-test (intern (format "compat-%s-%04d-compat" name
compat-test-counter))))
+ (let ((real-test (intern (format "%s-%04d-actual" compat
compat-test-counter)))
+ (comp-test (intern (format "%s-%04d-compat" compat
compat-test-counter))))
(setq compat-test-counter (1+ compat-test-counter))
(macroexp-progn
(list (and (fboundp name)
@@ -72,8 +72,8 @@ being compared against."
COMPAT is the name of the compatibility function the behaviour is
being compared against."
(lambda (error-spec &rest args)
- (let ((real-test (intern (format "compat-%s-%04d-actual" name
compat-test-counter)))
- (comp-test (intern (format "compat-%s-%04d-compat" name
compat-test-counter)))
+ (let ((real-test (intern (format "%s-%04d-actual" compat
compat-test-counter)))
+ (comp-test (intern (format "%s-%04d-compat" compat
compat-test-counter)))
(error-type (if (consp error-spec) (car error-spec) error-spec)))
(setq compat-test-counter (1+ compat-test-counter))
(macroexp-progn
@@ -412,21 +412,20 @@ being compared against."
(ought '(1 2 3) '(1 2 3)) ;multiple element list
(ought '(1) 1)) ;atom
-(unless (version< emacs-version "26")
- (compat-deftest (proper-list-p compat--proper-list-p-length-signal)
- (ought 0 ()) ;empty list
- (ought 1 '(1)) ;single element
- (ought 3 '(1 2 3)) ;multiple elements
- (ought nil '(1 . 2)) ;cons
- (ought nil '(1 2 . 3)) ;dotted
- (ought nil (let ((l (list 1 2 3))) ;circular
- (setf (nthcdr 3 l) l)
- l))
- (ought nil 1) ;non-lists
- (ought nil "")
- (ought nil "abc")
- (ought nil [])
- (ought nil [1 2 3])))
+(compat-deftest (proper-list-p compat--proper-list-p-length-signal)
+ (ought 0 ()) ;empty list
+ (ought 1 '(1)) ;single element
+ (ought 3 '(1 2 3)) ;multiple elements
+ (ought nil '(1 . 2)) ;cons
+ (ought nil '(1 2 . 3)) ;dotted
+ (ought nil (let ((l (list 1 2 3))) ;circular
+ (setf (nthcdr 3 l) l)
+ l))
+ (ought nil 1) ;non-lists
+ (ought nil "")
+ (ought nil "abc")
+ (ought nil [])
+ (ought nil [1 2 3]))
(compat-deftest (proper-list-p compat--proper-list-p-tortoise-hare)
(ought 0 ()) ;empty list
@@ -584,24 +583,22 @@ being compared against."
(ought 'b 2 '(1 (2 . b) 3))
(ought nil 2 '((1 . a) 2 (3 . c)))
(ought 'a 1 '((3 . c) (2 . b) (1 . a)))
- (ought nil "a" '(("a" . 1) ("b" . 2) ("c" . 3)))) ;non-primitive elements
-(when (version<= "26.1" emacs-version)
- (compat-deftest (alist-get compat--alist-get-full-elisp)
- ;; With testfn (advised behaviour):
- (ought 1 "a" '(("a" . 1) ("b" . 2) ("c" . 3)) nil nil #'equal)
- (ought 1 3 '((10 . 10) (4 . 4) (1 . 1) (9 . 9)) nil nil #'<)
- (ought '(a) "b" '(("c" c) ("a" a) ("b" b)) nil nil #'string-lessp)
- (ought 'c "a" '(("a" . a) ("a" . b) ("b" . c)) nil nil
- (lambda (s1 s2) (not (string= s1 s2))))
- (ought 'emacs-lisp-mode
- "file.el"
- '(("\\.c\\'" . c-mode)
- ("\\.p\\'" . pascal-mode)
- ("\\.el\\'" . emacs-lisp-mode)
- ("\\.awk\\'" . awk-mode))
- nil nil #'string-match-p)
- (ought 'd 0 '((1 . a) (2 . b) (3 . c)) 'd) ;default value
- (ought 'd 2 '((1 . a) (2 . b) (3 . c)) 'd nil #'ignore)))
+ (ought nil "a" '(("a" . 1) ("b" . 2) ("c" . 3))) ;non-primitive elements
+ ;; With testfn (advised behaviour):
+ (ought 1 "a" '(("a" . 1) ("b" . 2) ("c" . 3)) nil nil #'equal)
+ (ought 1 3 '((10 . 10) (4 . 4) (1 . 1) (9 . 9)) nil nil #'<)
+ (ought '(a) "b" '(("c" c) ("a" a) ("b" b)) nil nil #'string-lessp)
+ (ought 'c "a" '(("a" . a) ("a" . b) ("b" . c)) nil nil
+ (lambda (s1 s2) (not (string= s1 s2))))
+ (ought 'emacs-lisp-mode
+ "file.el"
+ '(("\\.c\\'" . c-mode)
+ ("\\.p\\'" . pascal-mode)
+ ("\\.el\\'" . emacs-lisp-mode)
+ ("\\.awk\\'" . awk-mode))
+ nil nil #'string-match-p)
+ (ought 'd 0 '((1 . a) (2 . b) (3 . c)) 'd) ;default value
+ (ought 'd 2 '((1 . a) (2 . b) (3 . c)) 'd nil #'ignore))
(compat-deftest string-trim-left'
(ought "" "") ;empty string
- [elpa] externals/compat updated (c99569a419 -> 6b21a08666), ELPA Syncer, 2022/03/13
- [elpa] externals/compat 3472e208d7 03/13: Remove duplicate string-search test block, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 7aee4b40ef 02/13: Remove duplicate ert-set-test in compat--expect, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 21c70607aa 01/13: Have minimal definitions expand to a defalias if possible, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 327cb6b6e6 04/13: Allow specifying a condition to test defaliasing prefix functions, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 12c750656c 06/13: Move assoc-delete-all to emacs-27, ELPA Syncer, 2022/03/13
- [elpa] externals/compat abb32f1b9d 05/13: Add :cond to assoc definition, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 317b88abdc 08/13: Fix args-out-of-range signal upper-bound edge case, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 3a6990e954 09/13: Rename named-let name in tests to avoid byte compiler warnings, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 3b88489c8c 07/13: Exclude "MANUAL" from ELPA package, ELPA Syncer, 2022/03/13
- [elpa] externals/compat e5f4a546ae 10/13: Fix duplicate test name issues,
ELPA Syncer <=
- [elpa] externals/compat 3fa2a7477f 11/13: Avoid failing ":cond"-check if assoc-delete-all is not defined, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 6b21a08666 13/13: Update assoc-delete-all with prefix, ELPA Syncer, 2022/03/13
- [elpa] externals/compat 9e6b342095 12/13: Update MANUAL entry on assoc-delete-all, ELPA Syncer, 2022/03/13