]> git.eshelyaron.com Git - emacs.git/commitdiff
add native documentation support test
authorAndrea Corallo <akrl@sdf.org>
Sun, 8 Dec 2019 09:28:23 +0000 (10:28 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:12 +0000 (11:38 +0100)
test/src/comp-test-funcs.el
test/src/comp-tests.el

index 20d15ac0e7a49750dfa2b101593aa276f249a9fa..5e2fb0bd99a438e6b8ea4869719a49a635b92adb 100644 (file)
        (b 3))
     (% a b)))
 
+(defun comp-tests-doc-f ()
+  "A nice docstring"
+  t)
+
 \f
 ;;;;;;;;;;;;;;;;;;;;
 ;; Tromey's tests ;;
index 570dcbd1ffa3ae9124f7c4b65658d25a47ce3047..73c1fe14caa5142fc948931677d149e173aabeb2 100644 (file)
@@ -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 ()