[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector ce05c412ba 81/93: More tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector ce05c412ba 81/93: More tests |
Date: |
Tue, 24 May 2022 18:58:01 -0400 (EDT) |
branch: externals/inspector
commit ce05c412ba4633de816c21a87bf190276fbeadd7
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
More tests
---
inspector-tests.el | 95 +++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 79 insertions(+), 16 deletions(-)
diff --git a/inspector-tests.el b/inspector-tests.el
index 13871ee33b..1b092b24e0 100644
--- a/inspector-tests.el
+++ b/inspector-tests.el
@@ -97,24 +97,73 @@
;; Char tables
;;
https://www.gnu.org/software/emacs/manual/html_node/elisp/Char_002dTable-Type.html
-(inspector-inspect ascii-case-table)
+(ert-deftest inspector-tests--inspect-char-table-test ()
+ (inspector-inspect ascii-case-table)
+ (let ((buffer-string (buffer-string)))
+ (should (search "char-table" buffer-string))
+ (inspector-quit))
-(inspector-inspect (make-category-set "al"))
+ (inspector-inspect (make-display-table))
+ (let ((buffer-string (buffer-string)))
+ (should (search "char-table" buffer-string))
+ (inspector-quit))
-(inspector-inspect (make-display-table))
+ (inspector-inspect (standard-syntax-table))
+ (let ((buffer-string (buffer-string)))
+ (should (search "char-table" buffer-string))
+ (inspector-quit)))
-(inspector-inspect (standard-syntax-table))
+(ert-deftest inspector-tests--inspect-bool-vector-test ()
+ (inspector-inspect (make-category-set "al"))
+ (let ((buffer-string (buffer-string)))
+ (should (search "bool-vector" buffer-string))
+ (inspector-quit)))
-(inspector-inspect nil)
+(ert-deftest inspector-tests--inspect-nil-test ()
+ (inspector-inspect nil)
+ (let ((buffer-string (buffer-string)))
+ (should (search "nil" buffer-string))
+ (inspector-quit)))
-(inspector-inspect (cons 1 2))
+(ert-deftest inspector-tests--inspect-cons-test ()
+ (inspector-inspect (cons 1 2))
+ (let ((buffer-string (buffer-string)))
+ (should (search "cons" buffer-string))
+ (should (search "1" buffer-string))
+ (should (search "2" buffer-string))
+ (inspector-quit)))
-(inspector-inspect '((a . 33) (b . 44)))
+(ert-deftest inspector-tests--inspect-alist-test ()
+ (inspector-inspect '((a . 33) (b . 44)))
+ (let ((buffer-string (buffer-string)))
+ (when inspector-use-specialized-inspectors-for-lists
+ (should (search "association list" buffer-string)))
+ (should (search "a" buffer-string))
+ (should (search "b" buffer-string))
+ (should (search "33" buffer-string))
+ (should (search "44" buffer-string))
+ (inspector-quit)))
-(inspector-inspect '(:a 33 :b 44))
-(inspector-inspect '(a 33 b 44))
+(ert-deftest inspecto-tests--inspect-plist-test ()
+ (inspector-inspect '(:a 33 :b 44))
+ (let ((buffer-string (buffer-string)))
+ (when inspector-use-specialized-inspectors-for-lists
+ (should (search "property list" buffer-string)))
+ (should (search "a" buffer-string))
+ (should (search "b" buffer-string))
+ (should (search "33" buffer-string))
+ (should (search "44" buffer-string))
+ (inspector-quit))
-(inspector-inspect (make-bool-vector 3 t))
+ (inspector-inspect '(a 33 b 44))
+ (let ((buffer-string (buffer-string)))
+ (when inspector-use-specialized-inspectors-for-lists
+ (should (search "property list" buffer-string)))
+ (should (search "a" buffer-string))
+ (should (search "b" buffer-string))
+ (should (search "33" buffer-string))
+ (should (search "44" buffer-string))
+ (inspector-quit)))
(ert-deftest inspector-tests--inspect-hash-table-test ()
(inspector-inspect (let ((table (make-hash-table)))
@@ -137,7 +186,7 @@
(inspector-quit))
(defun inspector-tests--factorial (integer)
- "Compute factorial of an integer."
+ "Compute factorial of INTEGER."
(if (= 1 integer) 1
(* integer (inspector-tests--factorial (1- integer)))))
@@ -195,12 +244,26 @@
(should (search "40" buffer-string))
(inspector-quit)))
-(setq inspector-slice-size 10)
-(inspector-inspect (cl-loop for i from 1 to 101 collect i))
-(inspector-inspect (cl-loop for i from 1 to 101 collect (cons i (1+ i))))
-(inspector-inspect (cl-loop for i from 1 to 101 collect (gensym) collect i))
+(ert-deftest inspector-tests--slices-test ()
+ (let ((inspector-slice-size 10))
+ (inspector-inspect (cl-loop for i from 1 to 101 collect i))
+ (should (< (count-lines (point-min) (point-max)) 20))
+ (inspector-quit))
+
+ (let ((inspector-slice-size 100))
+ (inspector-inspect (cl-loop for i from 1 to 101 collect (cons i (1+ i))))
+ (should (< (count-lines (point-min) (point-max)) 120))
+ (inspector-quit))
+
+ (let ((inspector-slice-size 100))
+ (inspector-inspect (cl-loop for i from 1 to 101 collect (gensym) collect
i))
+ (should (< (count-lines (point-min) (point-max)) 120))
+ (inspector-quit))
-(inspector-inspect (apply #'vector (cl-loop for i from 1 to 1000 collect i)))
+ (let ((inspector-slice-size 100))
+ (inspector-inspect (apply #'vector (cl-loop for i from 1 to 1000 collect
i)))
+ (should (< (count-lines (point-min) (point-max)) 120))
+ (inspector-quit)))
(provide 'inspector-tests)
- [elpa] externals/inspector 22869bffb4 47/93: Indentation, (continued)
- [elpa] externals/inspector 22869bffb4 47/93: Indentation, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector f534e87d1d 54/93: Slice tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5f7ab9bfb7 06/93: Housekeeping, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 7574ca3ff9 51/93: Slice sequences, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 610d67b358 59/93: Test on property lists, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 970fa60851 68/93: Better horizontal line for title underline, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 17f6d1dfaf 71/93: Aesthetic adjustments, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0dc8dd946b 77/93: Render built-in functions, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ee6d2ea01b 80/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d60552c6d2 76/93: Some more tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ce05c412ba 81/93: More tests,
ELPA Syncer <=
- [elpa] externals/inspector 40b9031bd8 84/93: Delete .github, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e1395930a6 86/93: Proper faces for inspector buttons, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0c92102cfd 87/93: Inherit from fundamental-mode, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 9abd8f6890 91/93: Fix, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector f8affefb73 35/93: Major mode for inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 49c8c75ada 44/93: Fixes to Emacs debug backtrace inspection, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5b808173cc 52/93: Slice with [more] button, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector bc118aa31a 65/93: Show length of lists, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 094cd26780 78/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 902ffcfdfc 79/93: .gitignore, ELPA Syncer, 2022/05/24