[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 1b1d633c78 01/13: Restore tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 1b1d633c78 01/13: Restore tests |
Date: |
Wed, 4 Jan 2023 11:57:30 -0500 (EST) |
branch: externals/compat
commit 1b1d633c787245a6a5f19d8235c8ccc9ce9a9e50
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore tests
---
compat-tests.el | 110 ++++++++++++++++++++++----------------------------------
1 file changed, 43 insertions(+), 67 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 89bbb1cec9..09bf330811 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -53,6 +53,32 @@
(should (eq (compat-call plist-get list "first" #'string=) 10))
(should (eq (compat-call plist-get list "second" #'string=) 2))))
+(ert-deftest insert-into-buffer ()
+ ;; Without optional compat--arguments
+ (with-temp-buffer
+ (let ((other (current-buffer)))
+ (insert "abc")
+ (with-temp-buffer
+ (insert "def")
+ (insert-into-buffer other))
+ (should (string= (buffer-string) "abcdef"))))
+ ;; With one optional argument
+ (with-temp-buffer
+ (let ((other (current-buffer)))
+ (insert "abc")
+ (with-temp-buffer
+ (insert "def")
+ (insert-into-buffer other 2))
+ (should (string= (buffer-string) "abcef"))))
+ ;; With two optional arguments
+ (with-temp-buffer
+ (let ((other (current-buffer)))
+ (insert "abc")
+ (with-temp-buffer
+ (insert "def")
+ (insert-into-buffer other 2 3))
+ (should (string= (buffer-string) "abce")))))
+
(ert-deftest bool-vector-exclusive-or ()
(let ((a (bool-vector t t nil nil))
(b (bool-vector t nil t nil)))
@@ -594,6 +620,23 @@
(should (directory-name-p "dir/subdir/"))
(should-not (directory-name-p "dir/subdir")))
+(ert-deftest make-lock-file-name ()
+ (should-equal (expand-file-name ".#") (make-lock-file-name ""))
+ (should-equal (expand-file-name ".#a") (make-lock-file-name "a"))
+ (should-equal (expand-file-name ".#foo") (make-lock-file-name "foo"))
+ (should-equal (expand-file-name ".#.") (make-lock-file-name "."))
+ (should-equal (expand-file-name ".#.#") (make-lock-file-name ".#"))
+ (should-equal (expand-file-name ".#.a") (make-lock-file-name ".a"))
+ (should-equal (expand-file-name ".#.#") (make-lock-file-name ".#"))
+ (should-equal (expand-file-name "a/.#") (make-lock-file-name "a/"))
+ (should-equal (expand-file-name "a/.#b") (make-lock-file-name "a/b"))
+ (should-equal (expand-file-name "a/.#.#") (make-lock-file-name "a/.#"))
+ (should-equal (expand-file-name "a/.#.") (make-lock-file-name "a/."))
+ (should-equal (expand-file-name "a/.#.b") (make-lock-file-name "a/.b"))
+ (should-equal (expand-file-name "a/.#foo") (make-lock-file-name "a/foo"))
+ (should-equal (expand-file-name "bar/.#b") (make-lock-file-name "bar/b"))
+ (should-equal (expand-file-name "bar/.#foo") (make-lock-file-name
"bar/foo")))
+
(ert-deftest file-size-human-readable ()
(should-equal "1000" (compat-call file-size-human-readable 1000))
(should-equal "1k" (compat-call file-size-human-readable 1024))
@@ -1376,56 +1419,6 @@
;; (should-not
;; (and-let* (((= 5 6))) t)))
-;; (ert-deftest insert-into-buffer ()
-;; ;; Without optional compat--arguments
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (compat--t-insert-into-buffer other))
-;; (should (string= (buffer-string) "abcdef"))))
-;; (when (fboundp 'insert-into-buffer)
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (insert-into-buffer other))
-;; (should (string= (buffer-string) "abcdef")))))
-;; ;; With one optional argument
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (compat--t-insert-into-buffer other 2))
-;; (should (string= (buffer-string) "abcef"))))
-;; (when (fboundp 'insert-into-buffer)
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (insert-into-buffer other 2))
-;; (should (string= (buffer-string) "abcef")))))
-;; ;; With two optional arguments
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (compat--t-insert-into-buffer other 2 3))
-;; (should (string= (buffer-string) "abce"))))
-;; (when (fboundp 'insert-into-buffer)
-;; (with-temp-buffer
-;; (let ((other (current-buffer)))
-;; (insert "abc")
-;; (with-temp-buffer
-;; (insert "def")
-;; (insert-into-buffer other 2 3))
-;; (should (string= (buffer-string) "abce"))))))
-
;; (ert-deftest regexp-unmatchable ()
;; (dolist (str '("" ;empty string
;; "a" ;simple string
@@ -1570,23 +1563,6 @@
;; (should-equal nil "rgbi : 0/0/0")
;; (should-equal nil "rgbi:0/0.5/10"))
-;; (ert-deftest make-lock-file-name
-;; (should-equal (expand-file-name ".#") "")
-;; (should-equal (expand-file-name ".#a") "a")
-;; (should-equal (expand-file-name ".#foo") "foo")
-;; (should-equal (expand-file-name ".#.") ".")
-;; (should-equal (expand-file-name ".#.#") ".#")
-;; (should-equal (expand-file-name ".#.a") ".a")
-;; (should-equal (expand-file-name ".#.#") ".#")
-;; (should-equal (expand-file-name "a/.#") "a/")
-;; (should-equal (expand-file-name "a/.#b") "a/b")
-;; (should-equal (expand-file-name "a/.#.#") "a/.#")
-;; (should-equal (expand-file-name "a/.#.") "a/.")
-;; (should-equal (expand-file-name "a/.#.b") "a/.b")
-;; (should-equal (expand-file-name "a/.#foo") "a/foo")
-;; (should-equal (expand-file-name "bar/.#b") "bar/b")
-;; (should-equal (expand-file-name "bar/.#foo") "bar/foo"))
-
;; (ert-deftest time-equal-p
;; (should-equal t nil nil)
- [elpa] externals/compat updated (241e38bb45 -> 18a83e1dff), ELPA Syncer, 2023/01/04
- [elpa] externals/compat c2e0835dd3 03/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 1b1d633c78 01/13: Restore tests,
ELPA Syncer <=
- [elpa] externals/compat c314cdf427 02/13: Remove realnames, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 20d103c09c 09/13: Restore if-let* test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat b97b756871 07/13: Restore if-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 414135b6f9 06/13: Restore and-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 639d03eed7 04/13: Restore date tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 27ad893406 05/13: Update version number, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 79d3562f6d 11/13: Add when-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 337c32e588 12/13: Restore regexp tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 18a83e1dff 13/13: Add UNTESTED labels behind compat-defuns for greppability, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 8a479d7b52 10/13: Add when-let* test, ELPA Syncer, 2023/01/04