From 95a04fd26c91e6c6c9191a629d26886f136e30fc Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 16 Jul 2017 19:12:10 -0400 Subject: ; Avoid test failures when running from compiled test files * test/lisp/dom-tests.el: Require `subr-x' during runtime as well. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-23-inheritance-check, eieio-test-25-slot-tests): Mark as expected to fail when byte-compiled. --- test/lisp/emacs-lisp/cl-lib-tests.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/lisp/emacs-lisp/cl-lib-tests.el') diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el index 65bd97f3b2d..9e68dceb8f1 100644 --- a/test/lisp/emacs-lisp/cl-lib-tests.el +++ b/test/lisp/emacs-lisp/cl-lib-tests.el @@ -518,7 +518,15 @@ (ert-deftest cl-lib-symbol-macrolet-2 () (should (equal (cl-lib-symbol-macrolet-4+5) (+ 4 5)))) +(defun cl-lib-tests--dummy-function () + ;; Dummy function to see if the file is compiled. + t) + (ert-deftest cl-lib-defstruct-record () + ;; This test fails when compiled, see Bug#24402/27718. + :expected-result (if (byte-code-function-p + (symbol-function 'cl-lib-tests--dummy-function)) + :failed :passed) (cl-defstruct foo x) (let ((x (make-foo :x 42))) (should (recordp x)) -- cgit v1.2.1