summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert.el
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2017-07-31 01:13:53 -0400
committerKen Raeburn <raeburn@raeburn.org>2017-07-31 01:13:53 -0400
commit13f3370400031e2ac1c9be0932f411370fc6984e (patch)
tree06f349b2b0f1cda9e36f7c4390d9d2d9bf49303c /lisp/emacs-lisp/ert.el
parentcd0966b33c1fe975520e85e0e7af82c09e4754dc (diff)
parentdcfcaf40d577808d640016c886d4fae7280a7fd5 (diff)
downloademacs-scratch/raeburn-startup.tar.gz
; Merge from branch 'master'scratch/raeburn-startup
Diffstat (limited to 'lisp/emacs-lisp/ert.el')
-rw-r--r--lisp/emacs-lisp/ert.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index cee225cc8e0..d7bd331c11b 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -135,7 +135,7 @@ Emacs bug 6581 at URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581'."
;; Note that nil is still a valid value for the `name' slot in
;; ert-test objects. It designates an anonymous test.
(error "Attempt to define a test named nil"))
- (put symbol 'ert--test definition)
+ (define-symbol-prop symbol 'ert--test definition)
definition)
(defun ert-make-test-unbound (symbol)
@@ -214,12 +214,6 @@ description of valid values for RESULT-TYPE.
,@(when tags-supplied-p
`(:tags ,tags))
:body (lambda () ,@body)))
- ;; This hack allows `symbol-file' to associate `ert-deftest'
- ;; forms with files, and therefore enables `find-function' to
- ;; work with tests. However, it leads to warnings in
- ;; `unload-feature', which doesn't know how to undefine tests
- ;; and has no mechanism for extension.
- (push '(ert-deftest . ,name) current-load-list)
',name))))
;; We use these `put' forms in addition to the (declare (indent)) in
@@ -2405,8 +2399,7 @@ To be used in the ERT results buffer."
(buffer-disable-undo)
(erase-buffer)
(ert-simple-view-mode)
- ;; Use unibyte because `debugger-setup-buffer' also does so.
- (set-buffer-multibyte nil)
+ (set-buffer-multibyte t) ; mimic debugger-setup-buffer
(setq truncate-lines t)
(ert--print-backtrace backtrace t)
(goto-char (point-min))
@@ -2539,7 +2532,7 @@ To be used in the ERT results buffer."
(insert (if test-name (format "%S" test-name) "<anonymous test>"))
(insert " is a test")
(let ((file-name (and test-name
- (symbol-file test-name 'ert-deftest))))
+ (symbol-file test-name 'ert--test))))
(when file-name
(insert (format-message " defined in `%s'"
(file-name-nondirectory file-name)))