1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 07:20:35 -08:00

Add comp-test-40187 checking function shadowing.

This commit is contained in:
Andrea Corallo 2020-03-29 10:57:36 +01:00
parent 89cbff32e4
commit c69c185109
2 changed files with 14 additions and 0 deletions

View file

@ -272,6 +272,14 @@
(defun comp-test-interactive-form2-f ()
(interactive))
(defun comp-test-40187-2-f ()
'foo)
(defalias 'comp-test-40187-1-f (symbol-function 'comp-test-40187-2-f))
(defun comp-test-40187-2-f ()
'bar)
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;

View file

@ -339,6 +339,12 @@ Check that the resulting binaries do not differ."
(should (equal (interactive-form #'comp-tests-free-fun-f)
'(interactive))))
(ert-deftest comp-test-40187 ()
"Check function name shadowing.
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html."
(should (eq (comp-test-40187-1-f) 'foo))
(should (eq (comp-test-40187-2-f) 'bar)))
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;