diff options
| author | Glenn Morris | 2017-05-30 21:01:56 -0400 |
|---|---|---|
| committer | Glenn Morris | 2017-05-30 21:01:56 -0400 |
| commit | 855b3e700fd1db62ae701a89bce4be5ed094352a (patch) | |
| tree | acab45eeeda16e42cc2fce5cac24015b49b925e1 | |
| parent | e3b51b080fab02f579b7c6a91b609a2c0aca8339 (diff) | |
| download | emacs-855b3e700fd1db62ae701a89bce4be5ed094352a.tar.gz emacs-855b3e700fd1db62ae701a89bce4be5ed094352a.zip | |
Avoid subr test failure when source dir has multiple names
* test/lisp/subr-tests.el (subr-tests--this-file):
Use the true name of the file. The following test does a string
comparison of this value with that from method-files, which uses
load-history, which contains true names.
| -rw-r--r-- | test/lisp/subr-tests.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 8fa258d12ed..c0bfd40f806 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el | |||
| @@ -298,7 +298,8 @@ cf. Bug#25477." | |||
| 298 | (cl-defmethod subr-tests--generic ((x integer)) | 298 | (cl-defmethod subr-tests--generic ((x integer)) |
| 299 | (message "%s is a number" x)) | 299 | (message "%s is a number" x)) |
| 300 | (cl-defgeneric subr-tests--generic-without-methods (x y)) | 300 | (cl-defgeneric subr-tests--generic-without-methods (x y)) |
| 301 | (defvar subr-tests--this-file (or load-file-name buffer-file-name)) | 301 | (defvar subr-tests--this-file |
| 302 | (file-truename (or load-file-name buffer-file-name))) | ||
| 302 | 303 | ||
| 303 | (ert-deftest subr-tests--method-files--finds-methods () | 304 | (ert-deftest subr-tests--method-files--finds-methods () |
| 304 | "`method-files' returns a list of files and methods for a generic function." | 305 | "`method-files' returns a list of files and methods for a generic function." |