]> code.delx.au - gnu-emacs/blobdiff - test/automated/ert-tests.el
Merge from emacs-24; up to 2014-07-22T06:37:31Z!yamaoka@jpl.org
[gnu-emacs] / test / automated / ert-tests.el
index 5d50bafd0da7cf0974824456d658b7affbd3b877..45440e060c2610c4786e49d990eefc3ff6f712e4 100644 (file)
@@ -375,18 +375,16 @@ This macro is used to test if macroexpansion in `should' works."
   (should-error (macroexpand '(ert-deftest ghi ()
                                 :documentation "foo"))))
 
-;; FIXME Test disabled due to persistent failure owing to lexical binding.
-;; http://debbugs.gnu.org/13064
-;;; (ert-deftest ert-test-record-backtrace ()
-;;;   (let ((test (make-ert-test :body (lambda () (ert-fail "foo")))))
-;;;     (let ((result (ert-run-test test)))
-;;;       (should (ert-test-failed-p result))
-;;;       (with-temp-buffer
-;;;         (ert--print-backtrace (ert-test-failed-backtrace result))
-;;;         (goto-char (point-min))
-;;;         (end-of-line)
-;;;         (let ((first-line (buffer-substring-no-properties (point-min) (point))))
-;;;           (should (equal first-line "  signal(ert-test-failed (\"foo\"))")))))))
+(ert-deftest ert-test-record-backtrace ()
+  (let ((test (make-ert-test :body (lambda () (ert-fail "foo")))))
+    (let ((result (ert-run-test test)))
+      (should (ert-test-failed-p result))
+      (with-temp-buffer
+        (ert--print-backtrace (ert-test-failed-backtrace result))
+        (goto-char (point-min))
+       (end-of-line)
+       (let ((first-line (buffer-substring-no-properties (point-min) (point))))
+         (should (equal first-line "  (closure (ert--test-body-was-run t) nil (ert-fail \"foo\"))()")))))))
 
 (ert-deftest ert-test-messages ()
   :tags '(:causes-redisplay)
@@ -833,3 +831,7 @@ This macro is used to test if macroexpansion in `should' works."
 (provide 'ert-tests)
 
 ;;; ert-tests.el ends here
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End: