[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dd7f1bb3a1: Silence recent comp-tests.el lexvar warnings
From: |
Basil L. Contovounesios |
Subject: |
master dd7f1bb3a1: Silence recent comp-tests.el lexvar warnings |
Date: |
Mon, 17 Oct 2022 14:04:22 -0400 (EDT) |
branch: master
commit dd7f1bb3a137f697552cce6bad8a364035e9c497
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Silence recent comp-tests.el lexvar warnings
* test/lisp/emacs-lisp/comp-tests.el: Mark used native-compile
variables as special to pacify unknown lexvar warnings in the
default build.
(with-test-native-compile-prune-cache): Instrument macro arguments
for debugging and indent conventionally. Reindent all callers.
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Simplify file name expansion.
---
test/lisp/emacs-lisp/comp-tests.el | 42 +++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/test/lisp/emacs-lisp/comp-tests.el
b/test/lisp/emacs-lisp/comp-tests.el
index 31f32dad1f..082b641fe3 100644
--- a/test/lisp/emacs-lisp/comp-tests.el
+++ b/test/lisp/emacs-lisp/comp-tests.el
@@ -25,7 +25,11 @@
(require 'ert-x)
(require 'comp)
+(defvar comp-native-version-dir)
+(defvar native-comp-eln-load-path)
+
(defmacro with-test-native-compile-prune-cache (&rest body)
+ (declare (indent 0) (debug t))
`(ert-with-temp-directory testdir
(setq testdir (expand-file-name "eln-cache" testdir))
(make-directory testdir)
@@ -42,32 +46,32 @@
(ert-deftest test-native-compile-prune-cache ()
(skip-unless (featurep 'native-compile))
(with-test-native-compile-prune-cache
- (native-compile-prune-cache)
- (should (file-directory-p c1))
- (should (file-regular-p (expand-file-name "some.eln" c1)))
- (should (file-regular-p (expand-file-name "some.eln.tmp" c1)))
- (should-not (file-directory-p c2))
- (should-not (file-regular-p (expand-file-name "some.eln" c2)))
- (should-not (file-regular-p (expand-file-name "some.eln.tmp" c2)))))
+ (native-compile-prune-cache)
+ (should (file-directory-p c1))
+ (should (file-regular-p (expand-file-name "some.eln" c1)))
+ (should (file-regular-p (expand-file-name "some.eln.tmp" c1)))
+ (should-not (file-directory-p c2))
+ (should-not (file-regular-p (expand-file-name "some.eln" c2)))
+ (should-not (file-regular-p (expand-file-name "some.eln.tmp" c2)))))
(ert-deftest test-native-compile-prune-cache/delete-only-eln ()
(skip-unless (featurep 'native-compile))
(with-test-native-compile-prune-cache
- (with-temp-file (expand-file-name "keep1.txt" c1) (insert "foo"))
- (with-temp-file (expand-file-name "keep2.txt" c2) (insert "foo"))
- (native-compile-prune-cache)
- (should (file-regular-p (expand-file-name "keep1.txt" c1)))
- (should (file-regular-p (expand-file-name "keep2.txt" c2)))))
+ (with-temp-file (expand-file-name "keep1.txt" c1) (insert "foo"))
+ (with-temp-file (expand-file-name "keep2.txt" c2) (insert "foo"))
+ (native-compile-prune-cache)
+ (should (file-regular-p (expand-file-name "keep1.txt" c1)))
+ (should (file-regular-p (expand-file-name "keep2.txt" c2)))))
(ert-deftest test-native-compile-prune-cache/dont-delete-in-parent-of-cache ()
(skip-unless (featurep 'native-compile))
(with-test-native-compile-prune-cache
- (let ((f1 (expand-file-name "some.eln" (expand-file-name ".." testdir)))
- (f2 (expand-file-name "some.eln" testdir)))
- (with-temp-file f1 (insert "foo"))
- (with-temp-file f2 (insert "foo"))
- (native-compile-prune-cache)
- (should (file-regular-p f1))
- (should (file-regular-p f2)))))
+ (let ((f1 (expand-file-name "../some.eln" testdir))
+ (f2 (expand-file-name "some.eln" testdir)))
+ (with-temp-file f1 (insert "foo"))
+ (with-temp-file f2 (insert "foo"))
+ (native-compile-prune-cache)
+ (should (file-regular-p f1))
+ (should (file-regular-p f2)))))
;;; comp-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master dd7f1bb3a1: Silence recent comp-tests.el lexvar warnings,
Basil L. Contovounesios <=