]> code.delx.au - gnu-emacs/blobdiff - test/lisp/emacs-lisp/package-tests.el
Merge emacs-25 into master (using imerge)
[gnu-emacs] / test / lisp / emacs-lisp / package-tests.el
index 6b3069c2a54a0e3d801d06da81967828511ee2fe..7206084f3246a588ea25ab82fc88c74f80b32dec 100644 (file)
@@ -242,6 +242,20 @@ Must called from within a `tar-mode' buffer."
     (should (package-installed-p 'simple-single))
     (should (package-installed-p 'simple-depend))))
 
+(ert-deftest package-test-macro-compilation ()
+  "Install a package which includes a dependency."
+  (with-package-test (:basedir "data/package")
+    (package-install-file (expand-file-name "macro-problem-package-1.0/"))
+    (require 'macro-problem)
+    ;; `macro-problem-func' uses a macro from `macro-aux'.
+    (should (equal (macro-problem-func) '(progn a b)))
+    (package-install-file (expand-file-name "macro-problem-package-2.0/"))
+    ;; After upgrading, `macro-problem-func' depends on a new version
+    ;; of the macro from `macro-aux'.
+    (should (equal (macro-problem-func) '(1 b)))
+    ;; `macro-problem-10-and-90' depends on an entirely new macro from `macro-aux'.
+    (should (equal (macro-problem-10-and-90) '(10 90)))))
+
 (ert-deftest package-test-install-two-dependencies ()
   "Install a package which includes a dependency."
   (with-package-test ()