+ (let ((regexp "autoloaded Lisp macro")
+ (result (help-fns-tests--describe-function 'help-fns-test--macro)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-built-in ()
+ (let ((regexp "a built-in function in .C source code")
+ (result (help-fns-tests--describe-function 'mapcar)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-interactive-built-in ()
+ (let ((regexp "an interactive built-in function in .C source code")
+ (result (help-fns-tests--describe-function 're-search-forward)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-lisp-macro ()
+ (let ((regexp "a Lisp macro in .subr\.el")
+ (result (help-fns-tests--describe-function 'when)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-lisp-defun ()
+ (let ((regexp "a compiled Lisp function in .subr\.el")
+ (result (help-fns-tests--describe-function 'last)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-lisp-defsubst ()
+ (let ((regexp "a compiled Lisp function in .subr\.el")
+ (result (help-fns-tests--describe-function 'posn-window)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-alias-to-defun ()
+ (let ((regexp "an alias for .set-file-modes. in .subr\.el")
+ (result (help-fns-tests--describe-function 'chmod)))
+ (should (string-match regexp result))))
+
+(ert-deftest help-fns-test-bug23887 ()
+ "Test for http://debbugs.gnu.org/23887 ."
+ (let ((regexp "an alias for .re-search-forward. in .subr\.el")
+ (result (help-fns-tests--describe-function 'search-forward-regexp)))
+ (should (string-match regexp result))))
+
+\f
+;;; Test describe-function over functions with funny names