(require 'ert)
(require 'compile)
-(defvar compile-tests--test-regexps-data
+(defconst compile-tests--test-regexps-data
;; The computed column numbers are zero-indexed, so subtract 1 from
;; what's reported in the string. The end column numbers are for
;; the character after, so it matches what's reported in the string.
The test data is in `compile-tests--test-regexps-data'."
(with-temp-buffer
(font-lock-mode -1)
- (mapc #'compile--test-error-line compile-tests--test-regexps-data)
- (should (eq compilation-num-errors-found 87))
- (should (eq compilation-num-warnings-found 32))
- (should (eq compilation-num-infos-found 20))))
+ (let ((compilation-num-errors-found 0)
+ (compilation-num-warnings-found 0)
+ (compilation-num-infos-found 0))
+ (mapc #'compile--test-error-line compile-tests--test-regexps-data)
+ (should (eq compilation-num-errors-found 87))
+ (should (eq compilation-num-warnings-found 32))
+ (should (eq compilation-num-infos-found 20)))))
(ert-deftest compile-test-grep-regexps ()
"Test the `grep-regexp-alist' regexps.