unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30745: 26.0.91; ert should macros nest strangely
@ 2018-03-07 21:34 Phillip Lord
  2018-03-07 22:24 ` Phillip Lord
  2018-03-08  0:12 ` Noam Postavsky
  0 siblings, 2 replies; 11+ messages in thread
From: Phillip Lord @ 2018-03-07 21:34 UTC (permalink / raw)
  To: 30745


ert should macros seem to behave strangely when nested.

Consider the following reproduction:

(require 'cl-lib)
(require 'ert)

(princ
 (cl-cdadr
  (ert-test-result-with-condition-condition
   (ert-run-test
    (make-ert-test
     :body
     (lambda () (should (eq 1 2))))))))

(princ "\nSecond test\n")

(princ
 (should
  (equal
   (cl-cdadr
    (ert-test-result-with-condition-condition
     (ert-run-test
      (make-ert-test
       :body
       (lambda () (should (eq 1 2)))))))
   '(:form (eq 1 2) :value nil))))

(princ "\n")

In Emacs-25 the following behaviour is seen when running this in batch.

~/src/git/emacs-git/emacs-25$ ./src/emacs --batch -l temp.el
(:form (eq 1 2) :value nil)
Second test
t


In Emacs-26, however, we get a different behaviour:


~/src/git/emacs-git/emacs-26$ ./phil_emacs.sh 
(:form (eq 1 2) :value nil)
Second test
Test failed: ((should (equal (cl-cdadr (ert-test-result-with-condition-condition (ert-run-test (make-ert-test :body (lambda nil (should (eq 1 2))))))) (quote (:form (eq 1 2) :value nil)))) :form (equal nil (:form (eq 1 2) :value nil)) :value nil :explanation (different-types nil (:form (eq 1 2) :value nil)))


So, although, the return type of this lot:

 (cl-cdadr
  (ert-test-result-with-condition-condition
   (ert-run-test
    (make-ert-test
     :body
     (lambda () (should (eq 1 2))))))))

remains the same between Emacs-25 and Emacs-26, a test for this breaks.

This regression is caused by:

commit 054c198c120c1f01a8ff753892d52710b740acc6

found by bisection. The regression continues on master.

I will try and find a simpler reproduction.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-07-22 13:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 21:34 bug#30745: 26.0.91; ert should macros nest strangely Phillip Lord
2018-03-07 22:24 ` Phillip Lord
2018-03-08 14:49   ` bug#24402: " Phillip Lord
2018-03-08  0:12 ` Noam Postavsky
2018-03-08  8:54   ` Phillip Lord
2018-08-15  0:47     ` Noam Postavsky
2019-06-24 18:54       ` Lars Ingebrigtsen
2019-06-24 22:53         ` Noam Postavsky
2019-06-28  3:06           ` Noam Postavsky
2020-11-29 10:35           ` Philipp Stephani
2021-07-22 13:13             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).