diff options
| author | Juanma Barranquero | 2017-01-28 04:40:36 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2017-01-28 04:40:36 +0100 |
| commit | 375c70fd9ef024f1a8ac99604e89c9991ac69eea (patch) | |
| tree | 53e34a0f31acccb6b16a4c62690294c4ef234de6 /test | |
| parent | 3979d8f45784ccf80cebbb5007da054a87ded2c9 (diff) | |
| download | emacs-375c70fd9ef024f1a8ac99604e89c9991ac69eea.tar.gz emacs-375c70fd9ef024f1a8ac99604e89c9991ac69eea.zip | |
test/*.el: Avoid byte-compiler warnings
* test/lisp/abbrev-tests.el (abbrev-table-p-test): Remove unused 'let*'.
* test/lisp/faces-tests.el (faces--test): New customization group.
(faces--test1, faces--test2): Use it.
* test/lisp/ffap-tests.el (ffap-tests-25243):
Call 'mark-whole-buffer' interactively.
* test/lisp/ibuffer-tests.el (ibuffer-filter-groups, ibuffer-filtering-alist)
(ibuffer-filtering-qualifiers, ibuffer-save-with-custom)
(ibuffer-saved-filter-groups, ibuffer-saved-filters): Defvar.
(ibuffer-format-qualifier, ibuffer-unary-operand): Declare.
* test/lisp/minibuffer-tests.el (completion-test1):
Mark unused lexical arguments.
* test/lisp/simple-tests.el (simple-test--dummy-buffer): Wrap result in
'with-no-warnings' to avoid them when the macro is invoked for effect.
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-count-test):
Mark unused lexical arguments.
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-surface-test):
Mark unused lexical arguments.
(let-alist-cons): Remove unused let binding.
* test/lisp/net/dbus-tests.el (dbus-debug): Defvar.
(dbus-get-unique-name): Declare.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid):
Call 'font-lock-fontify-buffer' interactively.
* test/lisp/textmodes/tildify-tests.el (tildify-space-undo-test--test):
Mark unused lexical argument.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/abbrev-tests.el | 3 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/cl-seq-tests.el | 6 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/let-alist-tests.el | 5 | ||||
| -rw-r--r-- | test/lisp/faces-tests.el | 9 | ||||
| -rw-r--r-- | test/lisp/ffap-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/ibuffer-tests.el | 9 | ||||
| -rw-r--r-- | test/lisp/minibuffer-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/net/dbus-tests.el | 3 | ||||
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/simple-tests.el | 6 | ||||
| -rw-r--r-- | test/lisp/textmodes/tildify-tests.el | 2 |
11 files changed, 31 insertions, 18 deletions
diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el index a454471ae3b..1ffcd6ac0d0 100644 --- a/test/lisp/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el | |||
| @@ -45,8 +45,7 @@ | |||
| 45 | (should-not (abbrev-table-p [])) | 45 | (should-not (abbrev-table-p [])) |
| 46 | ;; Missing :abbrev-table-modiff counter: | 46 | ;; Missing :abbrev-table-modiff counter: |
| 47 | (should-not (abbrev-table-p (obarray-make))) | 47 | (should-not (abbrev-table-p (obarray-make))) |
| 48 | (let* ((table (obarray-make))) | 48 | (should (abbrev-table-empty-p (make-abbrev-table)))) |
| 49 | (should (abbrev-table-empty-p (make-abbrev-table))))) | ||
| 50 | 49 | ||
| 51 | (ert-deftest abbrev-make-abbrev-table-test () | 50 | (ert-deftest abbrev-make-abbrev-table-test () |
| 52 | ;; Table without properties: | 51 | ;; Table without properties: |
diff --git a/test/lisp/emacs-lisp/cl-seq-tests.el b/test/lisp/emacs-lisp/cl-seq-tests.el index 3740b5c1836..61e3d720331 100644 --- a/test/lisp/emacs-lisp/cl-seq-tests.el +++ b/test/lisp/emacs-lisp/cl-seq-tests.el | |||
| @@ -250,9 +250,9 @@ Body are forms defining the test." | |||
| 250 | (should (= 0 (cl-count -5 list))) | 250 | (should (= 0 (cl-count -5 list))) |
| 251 | (should (= 0 (cl-count 2 list :start 2 :end 4))) | 251 | (should (= 0 (cl-count 2 list :start 2 :end 4))) |
| 252 | (should (= 4 (cl-count 'foo list :key (lambda (x) (and (cl-evenp x) 'foo))))) | 252 | (should (= 4 (cl-count 'foo list :key (lambda (x) (and (cl-evenp x) 'foo))))) |
| 253 | (should (= 4 (cl-count 'foo list :test (lambda (a b) (cl-evenp b))))) | 253 | (should (= 4 (cl-count 'foo list :test (lambda (_a b) (cl-evenp b))))) |
| 254 | (should (equal (cl-count 'foo list :test (lambda (a b) (cl-oddp b))) | 254 | (should (equal (cl-count 'foo list :test (lambda (_a b) (cl-oddp b))) |
| 255 | (cl-count 'foo list :test-not (lambda (a b) (cl-evenp b))))))) | 255 | (cl-count 'foo list :test-not (lambda (_a b) (cl-evenp b))))))) |
| 256 | 256 | ||
| 257 | ;; keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end | 257 | ;; keywords supported: :test :test-not :key :start1 :end1 :start2 :end2 :from-end |
| 258 | (ert-deftest cl-seq-mismatch-test () | 258 | (ert-deftest cl-seq-mismatch-test () |
diff --git a/test/lisp/emacs-lisp/let-alist-tests.el b/test/lisp/emacs-lisp/let-alist-tests.el index fbcde4e3cbf..d04645709e4 100644 --- a/test/lisp/emacs-lisp/let-alist-tests.el +++ b/test/lisp/emacs-lisp/let-alist-tests.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | (.test-two (cdr (assq 'test-two symbol)))) | 31 | (.test-two (cdr (assq 'test-two symbol)))) |
| 32 | (list .test-one .test-two | 32 | (list .test-one .test-two |
| 33 | .test-two .test-two))) | 33 | .test-two .test-two))) |
| 34 | (cl-letf (((symbol-function #'make-symbol) (lambda (x) 'symbol))) | 34 | (cl-letf (((symbol-function #'make-symbol) (lambda (_x) 'symbol))) |
| 35 | (macroexpand | 35 | (macroexpand |
| 36 | '(let-alist data (list .test-one .test-two | 36 | '(let-alist data (list .test-one .test-two |
| 37 | .test-two .test-two)))))) | 37 | .test-two .test-two)))))) |
| @@ -51,8 +51,7 @@ | |||
| 51 | (ert-deftest let-alist-cons () | 51 | (ert-deftest let-alist-cons () |
| 52 | (should | 52 | (should |
| 53 | (equal | 53 | (equal |
| 54 | (let ((.external "ext") | 54 | (let ((.external "ext")) |
| 55 | (.external.too "et")) | ||
| 56 | (let-alist '((test-two . 0) | 55 | (let-alist '((test-two . 0) |
| 57 | (test-three . 1) | 56 | (test-three . 1) |
| 58 | (sublist . ((foo . 2) | 57 | (sublist . ((foo . 2) |
diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el index a30ba25f8f0..2b3456d47f6 100644 --- a/test/lisp/faces-tests.el +++ b/test/lisp/faces-tests.el | |||
| @@ -23,13 +23,18 @@ | |||
| 23 | (require 'ert) | 23 | (require 'ert) |
| 24 | (require 'faces) | 24 | (require 'faces) |
| 25 | 25 | ||
| 26 | (defgroup faces--test nil "" | ||
| 27 | :group 'faces--test) | ||
| 28 | |||
| 26 | (defface faces--test1 | 29 | (defface faces--test1 |
| 27 | '((t :background "black" :foreground "black")) | 30 | '((t :background "black" :foreground "black")) |
| 28 | "") | 31 | "" |
| 32 | :group 'faces--test) | ||
| 29 | 33 | ||
| 30 | (defface faces--test2 | 34 | (defface faces--test2 |
| 31 | '((t :box 1)) | 35 | '((t :box 1)) |
| 32 | "") | 36 | "" |
| 37 | :group 'faces--test) | ||
| 33 | 38 | ||
| 34 | (ert-deftest faces--test-color-at-point () | 39 | (ert-deftest faces--test-color-at-point () |
| 35 | (with-temp-buffer | 40 | (with-temp-buffer |
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el index a3fe3502461..827d751be69 100644 --- a/test/lisp/ffap-tests.el +++ b/test/lisp/ffap-tests.el | |||
| @@ -44,7 +44,7 @@ index 3d7cebadcf..ad4b70d737 100644 | |||
| 44 | str | 44 | str |
| 45 | (make-string ffap-max-region-length #xa) | 45 | (make-string ffap-max-region-length #xa) |
| 46 | (format "%s ENDS HERE" file))) | 46 | (format "%s ENDS HERE" file))) |
| 47 | (mark-whole-buffer) | 47 | (call-interactively 'mark-whole-buffer) |
| 48 | (should (equal "" (ffap-string-at-point))) | 48 | (should (equal "" (ffap-string-at-point))) |
| 49 | (should (equal '(1 1) ffap-string-at-point-region))))) | 49 | (should (equal '(1 1) ffap-string-at-point-region))))) |
| 50 | (and (file-exists-p file) (delete-file file))))) | 50 | (and (file-exists-p file) (delete-file file))))) |
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el index fb632e2073d..b9f7fe7cde8 100644 --- a/test/lisp/ibuffer-tests.el +++ b/test/lisp/ibuffer-tests.el | |||
| @@ -23,6 +23,15 @@ | |||
| 23 | (eval-when-compile | 23 | (eval-when-compile |
| 24 | (require 'ibuf-macs)) | 24 | (require 'ibuf-macs)) |
| 25 | 25 | ||
| 26 | (defvar ibuffer-filter-groups) | ||
| 27 | (defvar ibuffer-filtering-alist) | ||
| 28 | (defvar ibuffer-filtering-qualifiers) | ||
| 29 | (defvar ibuffer-save-with-custom) | ||
| 30 | (defvar ibuffer-saved-filter-groups) | ||
| 31 | (defvar ibuffer-saved-filters) | ||
| 32 | (declare-function ibuffer-format-qualifier "ibuf-ext" (qualifier)) | ||
| 33 | (declare-function ibuffer-unary-operand "ibuf-ext" (filter)) | ||
| 34 | |||
| 26 | (ert-deftest ibuffer-autoload () | 35 | (ert-deftest ibuffer-autoload () |
| 27 | "Tests to see whether ibuffer has been autoloaded" | 36 | "Tests to see whether ibuffer has been autoloaded" |
| 28 | (skip-unless (not (featurep 'ibuf-ext))) | 37 | (skip-unless (not (featurep 'ibuf-ext))) |
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el index efed8f8bed4..7c5fcb4838f 100644 --- a/test/lisp/minibuffer-tests.el +++ b/test/lisp/minibuffer-tests.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | (ert-deftest completion-test1 () | 29 | (ert-deftest completion-test1 () |
| 30 | (with-temp-buffer | 30 | (with-temp-buffer |
| 31 | (cl-flet* ((test/completion-table (string pred action) | 31 | (cl-flet* ((test/completion-table (_string _pred action) |
| 32 | (if (eq action 'lambda) | 32 | (if (eq action 'lambda) |
| 33 | nil | 33 | nil |
| 34 | "test: ")) | 34 | "test: ")) |
diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 525709b92e7..0a59e3b42d1 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | (require 'ert) | 22 | (require 'ert) |
| 23 | (require 'dbus) | 23 | (require 'dbus) |
| 24 | 24 | ||
| 25 | (setq dbus-debug nil) | 25 | (defvar dbus-debug nil) |
| 26 | (declare-function dbus-get-unique-name "dbusbind.c" (bus)) | ||
| 26 | 27 | ||
| 27 | (defvar dbus--test-enabled-session-bus | 28 | (defvar dbus--test-enabled-session-bus |
| 28 | (and (featurep 'dbusbind) | 29 | (and (featurep 'dbusbind) |
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 158c52f080c..1e6b867d30b 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -2478,7 +2478,7 @@ if x: | |||
| 2478 | (python-tests-with-temp-buffer | 2478 | (python-tests-with-temp-buffer |
| 2479 | " \"\n" | 2479 | " \"\n" |
| 2480 | (goto-char (point-min)) | 2480 | (goto-char (point-min)) |
| 2481 | (font-lock-fontify-buffer))) | 2481 | (call-interactively 'font-lock-fontify-buffer))) |
| 2482 | 2482 | ||
| 2483 | 2483 | ||
| 2484 | ;;; Shell integration | 2484 | ;;; Shell integration |
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 6194cada1c6..f4849c4b21d 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el | |||
| @@ -30,8 +30,9 @@ | |||
| 30 | (insert "(a b") | 30 | (insert "(a b") |
| 31 | (save-excursion (insert " c d)")) | 31 | (save-excursion (insert " c d)")) |
| 32 | ,@body | 32 | ,@body |
| 33 | (cons (buffer-substring (point-min) (point)) | 33 | (with-no-warnings |
| 34 | (buffer-substring (point) (point-max))))) | 34 | (cons (buffer-substring (point-min) (point)) |
| 35 | (buffer-substring (point) (point-max)))))) | ||
| 35 | 36 | ||
| 36 | 37 | ||
| 37 | (defmacro simple-test--transpositions (&rest body) | 38 | (defmacro simple-test--transpositions (&rest body) |
| @@ -266,7 +267,6 @@ | |||
| 266 | (with-temp-buffer | 267 | (with-temp-buffer |
| 267 | (setq buffer-undo-list nil) | 268 | (setq buffer-undo-list nil) |
| 268 | (insert "hello") | 269 | (insert "hello") |
| 269 | (car buffer-undo-list) | ||
| 270 | (undo-auto--boundaries 'test)))) | 270 | (undo-auto--boundaries 'test)))) |
| 271 | 271 | ||
| 272 | ;;; Transposition with negative args (bug#20698, bug#21885) | 272 | ;;; Transposition with negative args (bug#20698, bug#21885) |
diff --git a/test/lisp/textmodes/tildify-tests.el b/test/lisp/textmodes/tildify-tests.el index 0a82b2521fb..f958fbc547a 100644 --- a/test/lisp/textmodes/tildify-tests.el +++ b/test/lisp/textmodes/tildify-tests.el | |||
| @@ -226,7 +226,7 @@ The function must terminate as soon as callback returns nil." | |||
| 226 | 226 | ||
| 227 | 227 | ||
| 228 | (defun tildify-space-undo-test--test | 228 | (defun tildify-space-undo-test--test |
| 229 | (modes nbsp env-open &optional set-space-string) | 229 | (modes nbsp _env-open &optional set-space-string) |
| 230 | (with-temp-buffer | 230 | (with-temp-buffer |
| 231 | (setq-local buffer-file-coding-system 'utf-8) | 231 | (setq-local buffer-file-coding-system 'utf-8) |
| 232 | (dolist (mode modes) | 232 | (dolist (mode modes) |