Fix quoting of help for functions with odd names
[emacs.git] / test / automated / help-fns.el
blob4815ac6825748a2b6287022b268ceedeac5a2aa5
1 ;;; help-fns.el --- tests for help-fns.el
3 ;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
5 ;; Maintainer: emacs-devel@gnu.org
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software: you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 ;;; Commentary:
24 ;;; Code:
26 (require 'ert)
28 (autoload 'help-fns-test--macro "help-fns" nil nil t)
30 (ert-deftest help-fns-test-bug17410 ()
31 "Test for http://debbugs.gnu.org/17410 ."
32 (describe-function 'help-fns-test--macro)
33 (with-current-buffer "*Help*"
34 (goto-char (point-min))
35 (should (search-forward "autoloaded Lisp macro" (line-end-position)))))
37 (defun abc\\\[universal-argument\]b\`c\'d\\e\"f (x)
38 "A function with a funny name.
40 \(fn XYYZZY)"
43 (defun defgh\\\[universal-argument\]b\`c\'d\\e\"f (x)
44 "Another function with a funny name."
47 (ert-deftest help-fns-test-funny-names ()
48 "Test for help with functions with funny names."
49 (describe-function 'abc\\\[universal-argument\]b\`c\'d\\e\"f)
50 (with-current-buffer "*Help*"
51 (goto-char (point-min))
52 (should (search-forward
53 "(abc\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f XYYZZY)")))
54 (describe-function 'defgh\\\[universal-argument\]b\`c\'d\\e\"f)
55 (with-current-buffer "*Help*"
56 (goto-char (point-min))
57 (should (search-forward
58 "(defgh\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f X)"))))
60 ;;; help-fns.el ends here