;;; Code:
-(eval-when-compile (require 'ert)) ;Don't indirectly require cl-lib at run-time.
(require 'cl-generic)
+;; Don't indirectly require `cl-lib' at run-time.
+(eval-when-compile (require 'ert))
+(declare-function ert--should-signal-hook "ert")
+(declare-function ert--signal-should-execution "ert")
+(declare-function ert-fail "ert")
+(declare-function ert-set-test "ert")
+
(fmakunbound 'cl--generic-1)
(cl-defgeneric cl--generic-1 (x y))
(cl-defgeneric (setf cl--generic-1) (v y z) "My generic doc.")
(should (package-installed-p 'simple-single))
(should (package-installed-p 'simple-depend))))
+(declare-function macro-problem-func "macro-problem" ())
+(declare-function macro-problem-10-and-90 "macro-problem" ())
+
(ert-deftest package-test-macro-compilation ()
"Install a package which includes a dependency."
(with-package-test (:basedir "package-resources")
"Test updating package archives."
(with-package-test ()
(let ((buf (package-list-packages)))
- (package-menu-refresh)
+ (revert-buffer)
(search-forward-regexp "^ +simple-single")
(package-menu-mark-install)
(package-menu-execute)
(let ((package-test-data-dir
(expand-file-name "package-resources/newer-versions" package-test-file-dir)))
(setq package-archives `(("gnu" . ,package-test-data-dir)))
- (package-menu-refresh)
+ (revert-buffer)
;; New version should be available and old version should be installed
(goto-char (point-min))
(package-menu-mark-upgrades)
(package-menu-execute)
- (package-menu-refresh)
+ (revert-buffer)
(should (package-installed-p 'simple-single '(1 4)))))))
(ert-deftest package-test-update-archives-async ()
(let ((process-environment
(cons (concat "HOME=" homedir)
process-environment)))
+ (require 'epg-config)
+ (defvar epg-config--program-alist)
(epg-find-configuration
'OpenPGP nil
;; By default we require gpg2 2.1+ due to some
(should (progn (package-install 'signed-bad) 'noerror)))
;; Check if the installed package status is updated.
(let ((buf (package-list-packages)))
- (package-menu-refresh)
+ (revert-buffer)
(should (re-search-forward
"^\\s-+signed-good\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-"
nil t))
;;; Code:
(require 'ert)
+(require 'esh-mode)
(require 'eshell)
(defmacro with-temp-eshell (&rest body)
(require 'ert)
(require 'exif)
-(require 'seq)
(defun test-image-file (name)
(expand-file-name
(should (equal (exif-elem exif 'artist) "z"))))
(ert-deftest test-exit-direct-ascii-value ()
- (equal (exif--direct-ascii-value 28005 2 t) (string ?e ?m 0))
- (equal (exif--direct-ascii-value 28005 2 nil) (string ?m ?e 0)))
+ (should (equal (exif--direct-ascii-value 28005 2 t) (string ?e ?m 0)))
+ (should (equal (exif--direct-ascii-value 28005 2 nil) (string ?m ?e 0))))
;;; exif-tests.el ends here
(ccl-dump prog-pgg-code)
(should (equal (buffer-string) prog-pgg-dump))))
+(defvar pgg-parse-crc24)
+(declare-function pgg-parse-crc24-string "pgg-parse" (string))
+
(ert-deftest pgg-parse-crc24 ()
;; Compiler
(require 'pgg)
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary:
-
-;;
-
;;; Code:
+(require 'footnote)
+
(ert-deftest footnote-tests-same-place ()
(with-temp-buffer
(footnote-mode 1)
;; Define some mode-local overloadable/overridden functions for xref to find
(require 'mode-local)
+(declare-function xref-elisp-overloadable-no-methods-default "elisp-mode-tests")
+(declare-function xref-elisp-overloadable-no-default-default "elisp-mode-tests")
+
(define-overloadable-function xref-elisp-overloadable-no-methods ()
"doc string overloadable no-methods")
(define-overloadable-function xref-elisp-overloadable-no-default ()
"doc string overloadable no-default")
-;; FIXME: byte compiler complains about unused lexical arguments
-;; generated by this macro.
(define-mode-local-override xref-elisp-overloadable-no-default c-mode
- (start end &optional nonterminal depth returnonerror)
+ (_start _end &optional _nonterminal _depth _returnonerror)
"doc string overloadable no-default c-mode."
"result overloadable no-default c-mode.")
"result overloadable co-located-default.")
(define-mode-local-override xref-elisp-overloadable-co-located-default c-mode
- (start end &optional nonterminal depth returnonerror)
+ (_start _end &optional _nonterminal _depth _returnonerror)
"doc string overloadable co-located-default c-mode."
"result overloadable co-located-default c-mode.")
"result overloadable separate-default.")
(define-mode-local-override xref-elisp-overloadable-separate-default c-mode
- (start end &optional nonterminal depth returnonerror)
+ (_start _end &optional _nonterminal _depth _returnonerror)
"doc string overloadable separate-default c-mode."
"result overloadable separate-default c-mode.")
"Add a product that already exists."
(sql-test-product-feature-harness
- (should-error (sql-add-feature 'a "Aaa"))
+ (should-error (sql-add-product 'a "Aaa"))
(should (equal (pp-to-string (assoc 'a sql-product-alist))
"(a :X 1 :Y 2 :Z sql-test-feature-value-a)\n"))))
(defmacro with-shell-command-dont-erase-buffer (str output-buffer-is-current &rest body)
(declare (debug (sexp form body)) (indent 2))
- (let ((expected (make-symbol "expected"))
- (command (make-symbol "command"))
+ (let ((command (make-symbol "command"))
(caller-buf (make-symbol "caller-buf"))
(output-buf (make-symbol "output-buf")))
`(let* ((,caller-buf (generate-new-buffer "caller-buf"))
(delete-directory test-dir t)))))
(defvar server-socket-dir)
+(declare-function dired-smart-shell-command "dired-x"
+ (command &optional output-buffer error-buffer))
(ert-deftest wdired-test-bug34915 ()
"Test editing when dired-listing-switches includes -F.
;;; Code:
(require 'ert)
+(require 'seq)
(eval-when-compile (require 'cl-lib))
(ert-deftest overlay-modification-hooks-message-other-buf ()
sum 1))
(defun test-bool-vector-bv-from-hex-string (desc)
- (let (bv nchars nibbles)
+ (let (bv nibbles)
(dolist (c (string-to-list desc))
(push (string-to-number
(char-to-string c)
(defun test-bool-vector-apply-mock-op (mock a b c)
"Compute (slowly) the correct result of a bool-vector set operation."
- (let (changed nv)
+ (let (changed)
(cl-assert (eql (length b) (length c)))
- (if a (setf nv a)
+ (unless a
(setf a (make-bool-vector (length b) nil))
(setf changed t))