From: Stefan Kangas Date: Thu, 5 Nov 2020 17:23:56 +0000 (+0100) Subject: ; Silence byte-compiler warnings in tests X-Git-Tag: emacs-28.0.90~5239 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38a109e58c3a4d945123e3e985efd40b0626eca0;p=emacs.git ; Silence byte-compiler warnings in tests * test/lisp/emacs-lisp/easy-mmode-tests.el (easy-mmode--minor-mode): * test/lisp/progmodes/cperl-mode-tests.el (cperl-bug30393): Silence byte-compiler. --- diff --git a/test/lisp/emacs-lisp/easy-mmode-tests.el b/test/lisp/emacs-lisp/easy-mmode-tests.el index c05379e4415..bbd01970b5b 100644 --- a/test/lisp/emacs-lisp/easy-mmode-tests.el +++ b/test/lisp/emacs-lisp/easy-mmode-tests.el @@ -44,20 +44,21 @@ '(c-mode (not message-mode mail-mode) text-mode)) t)))) +(define-minor-mode easy-mmode-test-mode "A test.") + (ert-deftest easy-mmode--minor-mode () (with-temp-buffer - (define-minor-mode test-mode "A test.") - (should (eq test-mode nil)) - (test-mode nil) - (should (eq test-mode t)) - (test-mode -33) - (should (eq test-mode nil)) - (test-mode 33) - (should (eq test-mode t)) - (test-mode 'toggle) - (should (eq test-mode nil)) - (test-mode 'toggle) - (should (eq test-mode t)))) + (should (eq easy-mmode-test-mode nil)) + (easy-mmode-test-mode nil) + (should (eq easy-mmode-test-mode t)) + (easy-mmode-test-mode -33) + (should (eq easy-mmode-test-mode nil)) + (easy-mmode-test-mode 33) + (should (eq easy-mmode-test-mode t)) + (easy-mmode-test-mode 'toggle) + (should (eq easy-mmode-test-mode nil)) + (easy-mmode-test-mode 'toggle) + (should (eq easy-mmode-test-mode t)))) (provide 'easy-mmode-tests) diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 2977f108131..effebc8068c 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -244,7 +244,7 @@ Perl is not Lisp: An open paren in column 0 does not start a function." (goto-char (point-min)) (while (null (eobp)) (cperl-indent-command) - (next-line)) + (forward-line 1)) (setq expected (concat "test case " name ":\n" expected)) (setq got (concat "test case " name ":\n" (buffer-string))) (should (equal got expected))))))))