Test byte-compiler free variable warning

* test/lisp/emacs-lisp/bytecomp-tests.el (ert-x): Require.
(bytecomp--define-warning-file-test): New macro.
(bytecomp-warn/warn-free-setq\.el)
(bytecomp-warn/warn-free-variable-reference\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-setq.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-variable-reference.el:
New files.
This commit is contained in:
Stefan Kangas 2020-11-30 22:42:08 +01:00
parent 713bac483b
commit a126c3684f
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,4 @@
;;; -*- lexical-binding: t -*-
(defvar xxx-test)
(defun foo ()
(setq xxx-test bar))