[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 36003a503d 13/14: Restore test
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 36003a503d 13/14: Restore test |
Date: |
Tue, 3 Jan 2023 20:57:29 -0500 (EST) |
branch: externals/compat
commit 36003a503da60fe4c4970f9fe3a5ec398c663876
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore test
---
compat-tests.el | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index c229ee68b7..c4ebd8c031 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -68,6 +68,21 @@
(should (equal t (always 1))) ;; single argument
(should (equal t (always 1 2 3 4)))) ;; multiple arguments
+(ert-deftest string-width ()
+ (should (equal 0 (compat-call string-width "")))
+ (should (equal 3 (compat-call string-width "abc"))) ;; no
argument
+ (should (equal 5 (compat-call string-width "abcあ")))
+ (should (equal (1+ tab-width) (compat-call string-width "a ")))
+ (should (equal 2 (compat-call string-width "abc" 1))) ;; with
from
+ (should (equal 4 (compat-call string-width "abcあ" 1)))
+ (should (equal tab-width (compat-call string-width "a " 1)))
+ (should (equal 2 (compat-call string-width "abc" 0 2))) ;; with
to
+ (should (equal 3 (compat-call string-width "abcあ" 0 3)))
+ (should (equal 1 (compat-call string-width "a " 0 1)))
+ (should (equal 1 (compat-call string-width "abc" 1 2))) ;; with
from and to
+ (should (equal 2 (compat-call string-width "abcあ" 3 4)))
+ (should (equal 0 (compat-call string-width "a " 1 1))))
+
(ert-deftest compat-hash-table-keys ()
(let ((ht (make-hash-table)))
(should (null (hash-table-keys ht)))
@@ -538,21 +553,6 @@
;; (expect error "rel/" "ext")
;; (expect error "/abs/" "ext"))
-;; (compat-deftests compat-string-width
-;; (ought 0 "")
-;; (ought 3 "abc") ;no argument
-;; (ought 5 "abcあ")
-;; (ought (1+ tab-width) "a ")
-;; (ought 2 "abc" 1) ;with from
-;; (ought 4 "abcあ" 1)
-;; (ought tab-width "a " 1)
-;; (ought 2 "abc" 0 2) ;with to
-;; (ought 3 "abcあ" 0 3)
-;; (ought 1 "a " 0 1)
-;; (ought 1 "abc" 1 2) ;with from and to
-;; (ought 2 "abcあ" 3 4)
-;; (ought 0 "a " 1 1))
-
;; (compat-deftests flatten-tree
;; ;; Example from docstring:
;; (ought '(1 2 3 4 5 6 7) '(1 (2 . 3) nil (4 5 (6)) 7))
- [elpa] externals/compat 2ceb91656d 09/14: Restore test, (continued)
- [elpa] externals/compat 2ceb91656d 09/14: Restore test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 0c25479bef 04/14: Restore tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 335ff37038 03/14: Restore test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 1b01c413ca 05/14: Restore tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat f875849c9e 07/14: Add missing test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 2a4c2dd906 08/14: Restore test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat a5b497e297 12/14: Remove obsolete code, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 20321c7ea2 10/14: Restore test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3ee973db10 14/14: Test prefixed function call, ELPA Syncer, 2023/01/03
- [elpa] externals/compat cb4fb51ad7 01/14: Simplify the test suite, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 36003a503d 13/14: Restore test,
ELPA Syncer <=