summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/seq-tests.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-05 11:30:14 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-05 11:30:14 +0800
commit1710fca446650b25c9656f2a6131785581afa22e (patch)
treeca3cb96966868d4ff7d283530613d1ea78d15c78 /test/lisp/emacs-lisp/seq-tests.el
parent360d2d3a3328799ed8fea27bc7c13873f84b65fa (diff)
parent8bdea767208257599f6ab727e51dd94f0c1872e1 (diff)
downloademacs-1710fca446650b25c9656f2a6131785581afa22e.tar.gz
emacs-1710fca446650b25c9656f2a6131785581afa22e.tar.bz2
emacs-1710fca446650b25c9656f2a6131785581afa22e.zip
Merge remote-tracking branch 'origin/master' into feature/pgtk
Diffstat (limited to 'test/lisp/emacs-lisp/seq-tests.el')
-rw-r--r--test/lisp/emacs-lisp/seq-tests.el24
1 files changed, 10 insertions, 14 deletions
diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el
index 8cfa3bdb862..4b940af81f1 100644
--- a/test/lisp/emacs-lisp/seq-tests.el
+++ b/test/lisp/emacs-lisp/seq-tests.el
@@ -172,23 +172,19 @@ Evaluate BODY for each created sequence.
(should-not (seq-find #'null '(1 2 3)))
(should (seq-find #'null '(1 2 3) 'sentinel)))
-;; Hack to work around the ERT limitation that we can't reliably use
-;; `with-suppressed-warnings' inside an `ert-deftest'. (Bug#36568)
-(defun seq--contains (&rest args)
- (with-suppressed-warnings ((obsolete seq-contains))
- (apply #'seq-contains args)))
-
(ert-deftest test-seq-contains ()
- (with-test-sequences (seq '(3 4 5 6))
- (should (seq--contains seq 3))
- (should-not (seq--contains seq 7)))
- (with-test-sequences (seq '())
- (should-not (seq--contains seq 3))
- (should-not (seq--contains seq nil))))
+ (with-suppressed-warnings ((obsolete seq-contains))
+ (with-test-sequences (seq '(3 4 5 6))
+ (should (seq-contains seq 3))
+ (should-not (seq-contains seq 7)))
+ (with-test-sequences (seq '())
+ (should-not (seq-contains seq 3))
+ (should-not (seq-contains seq nil)))))
(ert-deftest test-seq-contains-should-return-the-elt ()
- (with-test-sequences (seq '(3 4 5 6))
- (should (= 5 (seq--contains seq 5)))))
+ (with-suppressed-warnings ((obsolete seq-contains))
+ (with-test-sequences (seq '(3 4 5 6))
+ (should (= 5 (seq-contains seq 5))))))
(ert-deftest test-seq-contains-p ()
(with-test-sequences (seq '(3 4 5 6))