From 3345399e87fe6100ef82c399337760ab01182240 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 8 Dec 2019 10:28:23 +0100 Subject: [PATCH] add native documentation support test --- test/src/comp-test-funcs.el | 4 ++++ test/src/comp-tests.el | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 20d15ac0e7a..5e2fb0bd99a 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -257,6 +257,10 @@ (b 3)) (% a b))) +(defun comp-tests-doc-f () + "A nice docstring" + t) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 570dcbd1ffa..73c1fe14caa 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -307,6 +307,12 @@ Check that the resulting binaries do not differ." ;; See `comp-propagate-insn' `comp-function-call-remove'. (should (= (comp-tests-func-call-removal-f) 1))) +(ert-deftest comp-tests-doc () + (should (string= (documentation #'comp-tests-doc-f) + "A nice docstring")) + (should (string= (symbol-file #'comp-tests-doc-f) + (concat comp-test-src "n")))) + (ert-deftest comp-tests-free-fun () "Check we are able to compile a single function." (defun comp-tests-free-fun-f () -- 2.39.5