[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector e7f2f13ff4 75/93: Start writing ert tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector e7f2f13ff4 75/93: Start writing ert tests |
Date: |
Tue, 24 May 2022 18:58:01 -0400 (EDT) |
branch: externals/inspector
commit e7f2f13ff4839f6f9face82260fd1ec596b734ae
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Start writing ert tests
---
inspector-tests.el | 24 +++++++++++++++++++++---
inspector.el | 2 +-
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/inspector-tests.el b/inspector-tests.el
index 9a7b59aff9..a0ded5f8f8 100644
--- a/inspector-tests.el
+++ b/inspector-tests.el
@@ -33,10 +33,28 @@
;; The best may to fix this here is likely to use `ert-deftest'.
(require 'inspector)
+(require 'ert)
+
+(ert-deftest inspector-tests--inspect-integer-test ()
+ (inspector-inspect 22)
+ (let ((buffer-string (buffer-string)))
+ (should (search "22" buffer-string))
+ (should (search "integer" buffer-string)))
+ (inspector-quit))
+
+(ert-deftest inspector-tests--inspect-float-test ()
+ (inspector-inspect 2.22)
+ (let ((buffer-string (buffer-string)))
+ (should (search "2.22" buffer-string))
+ (should (search "float" buffer-string)))
+ (inspector-quit))
+
+(ert-deftest inspector-tests--inspect-character-test ()
+ (inspector-inspect ?a)
+ (let ((buffer-string (buffer-string)))
+ (should (search "character" buffer-string))
+ (inspector-quit)))
-(inspector-inspect 22)
-(inspector-inspect 2.22)
-(inspector-inspect ?a)
(inspector-inspect 'abcd)
(inspector-inspect :abcd)
(inspector-inspect '(1 2 3))
diff --git a/inspector.el b/inspector.el
index 02d980479b..277f7c16c6 100644
--- a/inspector.el
+++ b/inspector.el
@@ -462,7 +462,7 @@ slice in buffer."
(inspector--insert-label "integer")
(insert (inspector--princ-to-string integer))
(newline)
- (inspector--insert-label "char")
+ (inspector--insert-label "character")
(insert (inspector--princ-to-string (char-to-string integer))))
(cl-defmethod inspect-object ((hash-table hash-table))
- [elpa] externals/inspector 75ac7da10e 29/93: Menu and tool bar, (continued)
- [elpa] externals/inspector 75ac7da10e 29/93: Menu and tool bar, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 1e11bb1336 30/93: Evaluate expression with currently inspected object as context, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 701f65aacb 40/93: Inspect buffer contents, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 37dc9503c8 42/93: .., ELPA Syncer, 2022/05/24
- [elpa] externals/inspector fdd7420b8d 43/93: More hash-table details, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 2e23aeae84 48/93: Inspect finalizer type, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector cbb1d1cd2b 49/93: Some basic tests for elisp data types, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 51257fb9b5 55/93: tests: overlays, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 060da36d6f 58/93: Better quit behaviour, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 6c071c67b3 60/93: Housekeeping, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e7f2f13ff4 75/93: Start writing ert tests,
ELPA Syncer <=
- [elpa] externals/inspector b1d60310da 73/93: Patch by Stefan Monnier, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 739890b5d6 70/93: Autoloads?, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 477e363962 82/93: tests: no more side-effects, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b10f60c20d 89/93: Fontification for each type of object, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 6fadd6df9f 93/93: Create LICENSE, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d5d286c5de 10/93: inspect-last-sexp command, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 30d739e108 53/93: Slice arrays, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector a9e41424fa 66/93: Update README.md, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 4b193ba6d0 69/93: Don't add [more] button when not needed, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 2af90a4c82 83/93: tests: fixes, ELPA Syncer, 2022/05/24