diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-02 21:01:04 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-11-02 21:01:04 -0700 |
commit | c66a3944edca6150c9252e15a0ea75c96225481b (patch) | |
tree | 888bfa31967a17c174ba61d0a8547dd64658060a /test/lisp/emacs-lisp | |
parent | 770f245cdf2cf9e74e49bb32afb77562d9b1ad6d (diff) | |
parent | 7f089aa5f6d208209b2cfef8e0d3d9530e191248 (diff) | |
download | emacs-c66a3944edca6150c9252e15a0ea75c96225481b.tar.gz |
Merge from origin/emacs-26
7f089aa5f6 Require seq in rmc.el
53aaad1dfc Make an example code introduced in the Gnus info work (bug...
7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29...
015f0bb2d8 Port thread.c to OpenBSD ARM
ad68bbd0da Fix another "wrong side of point" error in CC Mode.
646e56e150 Fix Bug#28959
685fd77959 Fix duplicate .o file on QNX
e562356c3f Fix two js indentation problems
b8cf159bbc Update documentation for windows build
46540a1c7a Fix a "wrong side of point" error in CC Mode. Fixes bug #...
57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (...
aee0bc8775 Fix non-native fullscreen on NS (bug#28872)
d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test...
761c630766 Fix Bug#28982
628b653209 Fix windows build errors
e8a06a5f9a Fix compile warning for non-w32 builds
0c536a20fb Display commit in package description, if available (Bug#2...
1d83257a1d Port to QNX
19667f44ef * configure.ac: Tweak libcurses diagnostic.
3fc05cfaec Scripts to automate windows binary distribution
928a106939 Fix Edebug specs for map-let and with-maps-do
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ...
b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore...
a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis...
529a9c09d3 Further work on Bug#28889
c6deabaf4d Improve Tramp backward compatibility
8093e82e42 Improve backward compatibility of tramp-tests.el
46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947)
6360611457 Port to OpenIndiana
a012ec766c Don't fill keywords after Emacs Lisp docstring
b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove...
3aee7be62e Avoid unnecessary rounding errors in timestamps
2bfa42855b Fix xdg timestamp error on 32-bit Emacs
237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28...
d719ea6ad5 Another fix for unsafe directory error message (Bug#865)
b060e091c3 Handle https url for debbugs mbox (Bug#28831)
9e4265ef91 Ignore string properties when saving eshell history (Bug#2...
0f286ca85a Fix Bug#28889
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 11 | ||||
-rw-r--r-- | test/lisp/emacs-lisp/lisp-tests.el | 31 | ||||
-rw-r--r-- | test/lisp/emacs-lisp/map-tests.el | 2 | ||||
-rw-r--r-- | test/lisp/emacs-lisp/rmc-tests.el | 41 |
4 files changed, 84 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 30d2a4753cf..f508c365427 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -564,6 +564,17 @@ and will be removed soon. See (elisp)Backquote in the manual."))))))) (byte-compile-file source t) (should (equal bytecomp-tests--foobar (cons 1 2))))) +(ert-deftest bytecomp-tests--test-no-warnings-with-advice () + (defun f ()) + (define-advice f (:around (oldfun &rest args) test) + (apply oldfun args)) + (with-current-buffer (get-buffer-create "*Compile-Log*") + (let ((inhibit-read-only t)) (erase-buffer))) + (test-byte-comp-compile-and-load t '(defun f ())) + (with-current-buffer (get-buffer-create "*Compile-Log*") + (goto-char (point-min)) + (should-not (search-forward "Warning" nil t)))) + ;; Local Variables: ;; no-byte-compile: t ;; End: diff --git a/test/lisp/emacs-lisp/lisp-tests.el b/test/lisp/emacs-lisp/lisp-tests.el index ae1302bdce4..654d949d388 100644 --- a/test/lisp/emacs-lisp/lisp-tests.el +++ b/test/lisp/emacs-lisp/lisp-tests.el @@ -589,5 +589,36 @@ region." (should (= (point) before)) (should (= (mark) after)))) +(ert-deftest lisp-fill-paragraph-colon () + "Keywords below Emacs Lisp docstrings should not be filled (Bug#24622). +Keywords inside docstrings should be filled (Bug#7751)." + (elisp-tests-with-temp-buffer + " +\(defcustom custom value + \"First\n +Second\n +=!inside=Third line\" + =!keywords=:type 'sexp + :version \"26.1\" + :group 'lisp-tests)" + (goto-char inside) + (fill-paragraph) + (goto-char keywords) + (beginning-of-line) + (should (looking-at " :type 'sexp\n :version \"26.1\"\n :"))) + (elisp-tests-with-temp-buffer + " +\(defun foo () + \"Summary. +=!inside=Testing keywords: :one :two :three\" + (body))" ; FIXME: Remove parens around body to test Bug#28937 once it's fixed + (goto-char inside) + (let ((emacs-lisp-docstring-fill-column 30)) + (fill-paragraph)) + (forward-line) + (should (looking-at ":three")) + (end-of-line) + (should-not (eq (preceding-char) ?\))))) + (provide 'lisp-tests) ;;; lisp-tests.el ends here diff --git a/test/lisp/emacs-lisp/map-tests.el b/test/lisp/emacs-lisp/map-tests.el index 0a888d88b72..a434c9bd066 100644 --- a/test/lisp/emacs-lisp/map-tests.el +++ b/test/lisp/emacs-lisp/map-tests.el @@ -36,7 +36,7 @@ Each map is built from the following alist data: Evaluate BODY for each created map. \(fn (var map) body)" - (declare (indent 1) (debug t)) + (declare (indent 1) (debug (symbolp body))) (let ((alist (make-symbol "alist")) (vec (make-symbol "vec")) (ht (make-symbol "ht"))) diff --git a/test/lisp/emacs-lisp/rmc-tests.el b/test/lisp/emacs-lisp/rmc-tests.el new file mode 100644 index 00000000000..7ab79fda774 --- /dev/null +++ b/test/lisp/emacs-lisp/rmc-tests.el @@ -0,0 +1,41 @@ +;;; rmc-tests.el --- Test suite for rmc.el -*- lexical-binding: t -*- + +;; Copyright (C) 2017 Free Software Foundation, Inc. + +;; Author: Tino Calancha <tino.calancha@gmail.com> +;; 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/>. + +;;; Commentary: + +;; + +;;; Code: + +(require 'ert) +(require 'rmc) +(eval-when-compile (require 'cl-lib)) + + +(ert-deftest test-read-multiple-choice () + (dolist (char '(?y ?n)) + (cl-letf* (((symbol-function #'read-char) (lambda () char)) + (str (if (eq char ?y) "yes" "no"))) + (should (equal (list char str) + (read-multiple-choice "Do it? " '((?y "yes") (?n "no")))))))) + + +(provide 'rmc-tests) +;;; rmc-tests.el ends here |