mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-04 14:40:54 -08:00
* test/lisp/emacs-lisp/cl-generic-tests.el: * test/lisp/progmodes/elisp-mode-tests.el: Declare functions referred to within macroexpansions. (xref-elisp-overloadable-no-default) (xref-elisp-overloadable-co-located-default) (xref-elisp-overloadable-separate-default): Prefix unused arguments with underscore. * test/lisp/international/ccl-tests.el: * test/lisp/wdired-tests.el: * test/lisp/emacs-lisp/package-tests.el: Declare functions used. (package-test-update-archives, package-test-signed): Use revert-buffer in place of its obsolete alias package-menu-refresh. * test/lisp/eshell/eshell-tests.el: * test/lisp/mail/footnote-tests.el: * test/src/buffer-tests.el: Require dependencies used. * test/lisp/image/exif-tests.el: Remove unneeded (require 'seq). (test-exit-direct-ascii-value): Actually perform the test. * test/lisp/progmodes/sql-tests.el (sql-test-add-existing-product): Fix typo. * test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer): * test/src/data-tests.el (test-bool-vector-bv-from-hex-string) (test-bool-vector-apply-mock-op): Remove unused local variables.
45 lines
1.6 KiB
EmacsLisp
45 lines
1.6 KiB
EmacsLisp
;;; footnote-tests.el --- Tests for footnote-mode -*- lexical-binding: t; -*-
|
|
|
|
;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
|
|
|
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
|
;; Keywords:
|
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
;;; Code:
|
|
|
|
(require 'footnote)
|
|
|
|
(ert-deftest footnote-tests-same-place ()
|
|
(with-temp-buffer
|
|
(footnote-mode 1)
|
|
(insert "hello world")
|
|
(beginning-of-line) (forward-word)
|
|
(footnote-add-footnote)
|
|
(insert "footnote")
|
|
(footnote-back-to-message)
|
|
(should (equal (buffer-substring (point-min) (point))
|
|
"hello[1]"))
|
|
(beginning-of-line) (forward-word)
|
|
(footnote-add-footnote)
|
|
(insert "other footnote")
|
|
(footnote-back-to-message)
|
|
(should (equal (buffer-substring (point-min) (point))
|
|
"hello[1]"))
|
|
(should (equal (buffer-substring (point-min) (line-end-position))
|
|
"hello[1][2] world"))))
|
|
|
|
(provide 'footnote-tests)
|
|
;;; footnote-tests.el ends here
|