[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 23bccf5264 06/13: Restore tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 23bccf5264 06/13: Restore tests |
Date: |
Wed, 4 Jan 2023 09:57:31 -0500 (EST) |
branch: externals/compat
commit 23bccf5264ce716dc48d0910bb680c4aae9e071a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore tests
---
compat-tests.el | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index bb7b324b4e..4c4b28f88c 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -479,6 +479,18 @@
(should-equal '(1 2 3 4) (delete-consecutive-dups '(1 2 2 3 4 4)))
(should-equal '(1 2 3 2 4) (delete-consecutive-dups '(1 2 2 3 2 4 4))))
+(ert-deftest sort ()
+ (should-equal (list 1 2 3) (compat-call sort (list 1 2 3) #'<))
+ (should-equal (list 1 2 3) (compat-call sort (list 3 2 1) #'<))
+ (should-equal '[1 2 3] (compat-call sort '[1 2 3] #'<))
+ (should-equal '[1 2 3] (compat-call sort '[3 2 1] #'<)))
+
+(ert-deftest string-greaterp ()
+ (should (string-greaterp "b" "a"))
+ (should-not (string-greaterp "a" "b"))
+ (should (string-greaterp "aaab" "aaaa"))
+ (should-not (string-greaterp "aaaa" "aaab")))
+
(ert-deftest string-suffix-p ()
(should (string-suffix-p "a" "abba"))
(should (string-suffix-p "ba" "ba" "abba"))
@@ -956,6 +968,17 @@
(should-equal (compat-alist-get "one" alist-2 nil nil #'string=)
"eins")))
+(ert-deftest json-parse-string ()
+ (should-equal 0 (json-parse-string "0"))
+ (should-equal 1 (json-parse-string "1"))
+ (should-equal 0.5 (json-parse-string "0.5"))
+ (should-equal [1 2 3] (json-parse-string "[1,2,3]"))
+ (should-equal ["a" 2 3] (json-parse-string "[\"a\",2,3]"))
+ (should-equal [["a" 2] 3] (json-parse-string "[[\"a\",2],3]"))
+ (should-equal '(("a" 2) 3) (json-parse-string "[[\"a\",2],3]" :array-type
'list))
+ (should-equal 'foo (json-parse-string "null" :null-object 'foo))
+ (should-equal ["false" t] (json-parse-string "[false, true]" :false-object
"false")))
+
(ert-deftest json-serialize ()
(let ((input-1 '((:key . ["abc" 2]) (yek . t)))
(input-2 '(:key ["abc" 2] yek t))
@@ -1205,18 +1228,6 @@
;; (should-equal 'd 0 '((1 . a) (2 . b) (3 . c)) 'd) ;default value
;; (should-equal 'd 2 '((1 . a) (2 . b) (3 . c)) 'd nil #'ignore))
-;; (ert-deftest string-greaterp
-;; (should-equal t "b" "a")
-;; (should-equal nil "a" "b")
-;; (should-equal t "aaab" "aaaa")
-;; (should-equal nil "aaaa" "aaab"))
-
-;; (ert-deftest sort
-;; (should-equal (list 1 2 3) (list 1 2 3) #'<)
-;; (should-equal (list 1 2 3) (list 3 2 1) #'<)
-;; (should-equal '[1 2 3] '[1 2 3] #'<)
-;; (should-equal '[1 2 3] '[3 2 1] #'<))
-
;; (ert-deftest macroexpand-1
;; (should-equal '(if a b c) '(if a b c))
;; (should-equal '(if a (progn b)) '(when a b))
@@ -1295,17 +1306,6 @@
;; (should-not
;; (compat--t-and-let* (((= 5 6))) t)))
-;; (ert-deftest json-parse-string
-;; (should-equal 0 "0")
-;; (should-equal 1 "1")
-;; (should-equal 0.5 "0.5")
-;; (should-equal [1 2 3] "[1,2,3]")
-;; (should-equal ["a" 2 3] "[\"a\",2,3]")
-;; (should-equal [["a" 2] 3] "[[\"a\",2],3]")
-;; (should-equal '(("a" 2) 3) "[[\"a\",2],3]" :array-type 'list)
-;; (should-equal 'foo "null" :null-object 'foo)
-;; (should-equal ["false" t] "[false, true]" :false-object "false"))
-
;; (ert-deftest lookup-key
;; (let ((a-map (make-sparse-keymap))
;; (b-map (make-sparse-keymap)))
- [elpa] externals/compat 23a5060aa1 01/13: Restore tests, (continued)
- [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
- [elpa] externals/compat 23bccf5264 06/13: Restore tests,
ELPA Syncer <=
- [elpa] externals/compat 8977b4199d 13/13: Disable broken tests, ELPA Syncer, 2023/01/04