[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 1a5c5e0379 07/13: Restore tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 1a5c5e0379 07/13: Restore tests |
Date: |
Wed, 4 Jan 2023 09:57:31 -0500 (EST) |
branch: externals/compat
commit 1a5c5e0379fb66e684df9d7b61d9f8a11af4f37b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore tests
---
compat-tests.el | 66 ++++++++++++++++++++++++++++-----------------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 4c4b28f88c..5f4c74ff80 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -53,6 +53,39 @@
(should (eq (compat-call plist-get list "first" #'string=) 10))
(should (eq (compat-call plist-get list "second" #'string=) 2))))
+(ert-deftest provided-mode-derived-p ()
+ (let ((one (make-symbol "1"))
+ (two (make-symbol "2"))
+ (three (make-symbol "3"))
+ (one.5 (make-symbol "1.5"))
+ (eins (make-symbol "𝟙")))
+ (put two 'derived-mode-parent one)
+ (put one.5 'derived-mode-parent one)
+ (put three 'derived-mode-parent two)
+ (should-equal one (provided-mode-derived-p one one))
+ (should-equal one (provided-mode-derived-p two one))
+ (should-equal one (provided-mode-derived-p three one))
+ (should-equal nil (provided-mode-derived-p one eins))
+ (should-equal nil (provided-mode-derived-p two eins))
+ (should-equal nil (provided-mode-derived-p two one.5))
+ (should-equal one (provided-mode-derived-p two one.5 one))
+ (should-equal two (provided-mode-derived-p two one.5 two))
+ (should-equal one (provided-mode-derived-p three one.5 one))
+ (should-equal two (provided-mode-derived-p three one.5 one two))
+ (should-equal two (provided-mode-derived-p three one.5 two one))
+ (should-equal three (provided-mode-derived-p three one.5 two one three))
+ (should-equal three (provided-mode-derived-p three one.5 three two one))))
+
+(ert-deftest format-prompt ()
+ (should-equal "Prompt: " (format-prompt "Prompt" nil))
+ (should-equal "Prompt: " (format-prompt "Prompt" ""))
+ (should-equal "Prompt (default ): " (format-prompt "Prompt" " "))
+ (should-equal "Prompt (default 3): " (format-prompt "Prompt" 3))
+ (should-equal "Prompt (default abc): " (format-prompt "Prompt" "abc"))
+ (should-equal "Prompt (default abc def): " (format-prompt "Prompt" "abc
def"))
+ (should-equal "Prompt 10: " (format-prompt "Prompt %d" nil 10))
+ (should-equal "Prompt \"abc\" (default 3): " (format-prompt "Prompt %S" 3
"abc")))
+
(ert-deftest cXXXr ()
(let ((xxx '(((a . b) . (c . d)) . ((e . f) . (g . h)))))
(should-equal nil (caaar ()))
@@ -1233,16 +1266,6 @@
;; (should-equal '(if a (progn b)) '(when a b))
;; (should-equal '(if a (progn (unless b c))) '(when a (unless b c))))
-;; (ert-deftest format-prompt
-;; (should-equal "Prompt: " "Prompt" nil)
-;; (should-equal "Prompt: " "Prompt" "")
-;; (should-equal "Prompt (default ): " "Prompt" " ")
-;; (should-equal "Prompt (default 3): " "Prompt" 3)
-;; (should-equal "Prompt (default abc): " "Prompt" "abc")
-;; (should-equal "Prompt (default abc def): " "Prompt" "abc def")
-;; (should-equal "Prompt 10: " "Prompt %d" nil 10)
-;; (should-equal "Prompt \"abc\" (default 3): " "Prompt %S" 3 "abc"))
-
;; ;; TODO fix broken test
;; ;;(ert-deftest directory-files-recursively
;; ;; (should-equal
@@ -1694,29 +1717,6 @@
;; ;; (should-equal '(2 . 3) 'defalias)
;; ;; (should-equal '(1 . unevalled) 'defvar))
-;; (let ((one (make-symbol "1"))
-;; (two (make-symbol "2"))
-;; (three (make-symbol "3"))
-;; (one.5 (make-symbol "1.5"))
-;; (eins (make-symbol "𝟙")))
-;; (put two 'derived-mode-parent one)
-;; (put one.5 'derived-mode-parent one)
-;; (put three 'derived-mode-parent two)
-;; (ert-deftest provided-mode-derived-p
-;; (should-equal one one one)
-;; (should-equal one two one)
-;; (should-equal one three one)
-;; (should-equal nil one eins)
-;; (should-equal nil two eins)
-;; (should-equal nil two one.5)
-;; (should-equal one two one.5 one)
-;; (should-equal two two one.5 two)
-;; (should-equal one three one.5 one)
-;; (should-equal two three one.5 one two)
-;; (should-equal two three one.5 two one)
-;; (should-equal three three one.5 two one three)
-;; (should-equal three three one.5 three two one)))
-
;; (unless (fboundp 'make-prop-match)
;; (defalias 'make-prop-match
;; (if (version< emacs-version "26.1")
- [elpa] externals/compat updated (bf5b987481 -> 8977b4199d), ELPA Syncer, 2023/01/04
- [elpa] externals/compat 1a5c5e0379 07/13: Restore tests,
ELPA Syncer <=
- [elpa] externals/compat 23a5060aa1 01/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 96f1a41487 03/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat e980625d20 09/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 919f25d642 10/13: Restore test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat f364a280aa 02/13: Add should-equal, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 5a9ec8652f 05/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7bc5b76c81 08/13: Fix tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 55ab0bec7f 12/13: Restore alist tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat b2341ea416 11/13: Restore if-let tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 5eb1e75560 04/13: Fix test, ELPA Syncer, 2023/01/04