]> git.eshelyaron.com Git - emacs.git/commitdiff
; Silence obsoletion warning in mwheel-tests.
authorBasil L. Contovounesios <basil@contovou.net>
Wed, 1 May 2024 11:08:30 +0000 (13:08 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:30:42 +0000 (18:30 +0200)
(cherry picked from commit 04635f399b01925b8ed6bcf555e2f528cba2e401)

test/lisp/mwheel-tests.el

index 2b0f0ff384a95bb8a35db2838dc692e0ae96922f..f60b9ecd3b05441fbd1d3a7f4a9e6e5cb1ba5b6b 100644 (file)
 (require 'mwheel)
 
 (ert-deftest mwheel-test-enable/disable ()
-  (mouse-wheel-mode 1)
-  (should (eq (lookup-key (current-global-map) `[,mouse-wheel-up-event]) 'mwheel-scroll))
-  (mouse-wheel-mode -1)
-  (should (eq (lookup-key (current-global-map) `[,mouse-wheel-up-event]) nil)))
+  (with-suppressed-warnings ((obsolete mouse-wheel-up-event))
+    (mouse-wheel-mode 1)
+    (should (eq (lookup-key (current-global-map) `[,mouse-wheel-up-event])
+                'mwheel-scroll))
+    (mouse-wheel-mode -1)
+    (should-not (lookup-key (current-global-map) `[,mouse-wheel-up-event]))))
 
 (ert-deftest mwheel-test--create-scroll-keys ()
   (should (equal (mouse-wheel--create-scroll-keys 10 'mouse-4)