[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7757e9b: Use ert-resource-file in the shorthand tests
From: |
Lars Ingebrigtsen |
Subject: |
master 7757e9b: Use ert-resource-file in the shorthand tests |
Date: |
Tue, 28 Sep 2021 00:49:15 -0400 (EDT) |
branch: master
commit 7757e9b204e58419897874265a448d599dd9c69f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Use ert-resource-file in the shorthand tests
Also move to the standard directory naming.
---
.../simple-shorthand-test.el | 0
test/lisp/progmodes/elisp-mode-tests.el | 22 ++++++----------------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/test/lisp/progmodes/elisp-resources/simple-shorthand-test.el
b/test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
similarity index 100%
rename from test/lisp/progmodes/elisp-resources/simple-shorthand-test.el
rename to test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
diff --git a/test/lisp/progmodes/elisp-mode-tests.el
b/test/lisp/progmodes/elisp-mode-tests.el
index e0e2cb1..a2bd1b8 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -23,6 +23,7 @@
;;; Code:
(require 'ert)
+(require 'ert-x)
(require 'xref)
(eval-when-compile (require 'cl-lib))
@@ -1047,15 +1048,8 @@ evaluation of BODY."
expected))
(should (not (intern-soft shorthand-sname)))))
-(defvar elisp--test-resources-dir
- (expand-file-name "elisp-resources/"
- (file-name-directory
- (or load-file-name
- (error "this file needs to be loaded")))))
-
(ert-deftest elisp-shorthand-load-a-file ()
- (let ((test-file (expand-file-name "simple-shorthand-test.el"
- elisp--test-resources-dir)))
+ (let ((test-file (ert-resource-file "simple-shorthand-test.el")))
(mapatoms (lambda (s)
(when (string-match "^elisp--foo-" (symbol-name s))
(unintern s obarray))))
@@ -1065,10 +1059,8 @@ evaluation of BODY."
(ert-deftest elisp-shorthand-byte-compile-a-file ()
- (let ((test-file (expand-file-name "simple-shorthand-test.el"
- elisp--test-resources-dir))
- (byte-compiled (expand-file-name "simple-shorthand-test.elc"
- elisp--test-resources-dir)))
+ (let ((test-file (ert-resource-file "simple-shorthand-test.el"))
+ (byte-compiled (ert-resource-file "simple-shorthand-test.elc")))
(mapatoms (lambda (s)
(when (string-match "^elisp--foo-" (symbol-name s))
(unintern s obarray))))
@@ -1081,8 +1073,7 @@ evaluation of BODY."
(should-not (intern-soft "f-test"))))
(ert-deftest elisp-shorthand-completion-at-point ()
- (let ((test-file (expand-file-name "simple-shorthand-test.el"
- elisp--test-resources-dir)))
+ (let ((test-file (ert-resource-file "simple-shorthand-test.el")))
(load test-file)
(with-current-buffer (find-file-noselect test-file)
(revert-buffer t t)
@@ -1097,8 +1088,7 @@ evaluation of BODY."
(revert-buffer t t))))
(ert-deftest elisp-shorthand-escape ()
- (let ((test-file (expand-file-name "simple-shorthand-test.el"
- elisp--test-resources-dir)))
+ (let ((test-file (ert-resource-file "simple-shorthand-test.el")))
(load test-file)
(should (intern-soft "f-test4---"))
(should-not (intern-soft "elisp--foo-test4---"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7757e9b: Use ert-resource-file in the shorthand tests,
Lars Ingebrigtsen <=