summaryrefslogtreecommitdiff
path: root/test/lisp/obsolete/cl-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-12-04 15:49:42 +0100
committerStefan Kangas <stefan@marxist.se>2021-12-04 15:49:42 +0100
commit7c68c84674d67d7bee9d78b99ce01ad789a77961 (patch)
tree0e032bbcf81af016da4cbab3d1de4c84f76a9cc4 /test/lisp/obsolete/cl-tests.el
parentaa6681a51ad12e3fd8363febfbaacebe9dc06510 (diff)
downloademacs-7c68c84674d67d7bee9d78b99ce01ad789a77961.tar.gz
Silence byte-compiler in some tests
* test/lisp/dired-tests.el: * test/lisp/emacs-lisp/cl-macs-tests.el: * test/lisp/emacs-lisp/derived-tests.el: * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: * test/lisp/emacs-lisp/generator-tests.el: * test/lisp/emacs-lisp/lisp-tests.el: * test/lisp/emacs-lisp/seq-tests.el (test-seq-let) (test-seq-setq): * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-if-let*-false) (subr-x-test-if-let*-and-laziness-is-preserved) (subr-x-test-when-let*-false) (subr-x-test-when-let*-and-laziness-is-preserved): * test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check): * test/lisp/format-spec-tests.el (format-spec-do-flags-truncate) (format-spec-do-flags-pad): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762): * test/lisp/obsolete/cl-tests.el (labels-function-quoting): * test/lisp/progmodes/elisp-mode-tests.el: * test/lisp/replace-tests.el (replace-regexp-bug45973): * test/lisp/ses-tests.el: * test/lisp/subr-tests.el: * test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode): * test/src/data-tests.el (data-tests--set-default-per-buffer): * test/src/search-tests.el (test-replace-match-modification-hooks): Silence byte-compiler.
Diffstat (limited to 'test/lisp/obsolete/cl-tests.el')
-rw-r--r--test/lisp/obsolete/cl-tests.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/lisp/obsolete/cl-tests.el b/test/lisp/obsolete/cl-tests.el
index 0e02e1ca1bc..0b8c1178f3a 100644
--- a/test/lisp/obsolete/cl-tests.el
+++ b/test/lisp/obsolete/cl-tests.el
@@ -27,10 +27,15 @@
+;; Hack to work around the ERT limitation that we can't reliably use
+;; `with-suppressed-warnings' inside an `ert-deftest'. (Bug#36568)
+(defun cl-tests-labels-test ()
+ (with-suppressed-warnings ((obsolete labels))
+ (funcall (labels ((foo () t))
+ #'foo))))
+
(ert-deftest labels-function-quoting ()
"Test that #'foo does the right thing in `labels'." ; Bug#31792.
- (should (eq (funcall (labels ((foo () t))
- #'foo))
- t)))
+ (should (eq (cl-tests-labels-test) t)))
;;; cl-tests.el ends here