* bug#62471: 29.0.60; `erts-run-test' results inconsistent with batch mode
@ 2023-03-26 22:28 Troy Brown
0 siblings, 0 replies; only message in thread
From: Troy Brown @ 2023-03-26 22:28 UTC (permalink / raw)
To: 62471
Interactively running `erts-run-test' provides different (i.e.,
incorrect) results as when the test is run in batch mode. I noticed
this happens when a new "code" block is introduced. In the following
situation, there are two ERTS tests, each one supplies its own "code"
block associated with the test case. When I interactively attempt to
execute the second test case (i.e., C-c C-c from within `erts-mode'),
the test fails and the expected results match the output from the first
case.
I used the following two test files. `hi-test.el' is used to run the
test in batch mode (emacs -batch -l ert -l hi-test.el -f
ert-run-tests-batch-and-exit). This just runs the ERTS test cases.
The second file (located relatively from `hi-test.el' in
resources/hi.erts) contains the two test cases.
hi-test.el:
(require 'ert)
(require 'ert-x)
(ert-deftest hi-test-run ()
(ert-test-erts-file (ert-resource-file "hi.erts")))
resources/hi.erts:
Code:
(lambda ()
(fundamental-mode)
(goto-char (point-max))
(insert "there\n"))
Name: Hi there
=-=
Hi
=-=
Hi
there
=-=-=
Code:
(lambda ()
(fundamental-mode)
(goto-char (point-max))
(insert "you\n"))
Name: Hi you
=-=
Hi
=-=
Hi
you
=-=-=
Running in batch mode, I get the following result:
Running 1 tests (2023-03-26 18:10:33-0400, selector ‘t’)
passed 1/1 hi-test-run (0.000384 sec)
Ran 1 tests, 1 results as expected, 0 unexpected (2023-03-26
18:10:33-0400, 0.000493 sec)
Running interactively in the `erts-mode' buffer, I get the following
result:
Test failure; result:
Hi
there
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-26 22:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-26 22:28 bug#62471: 29.0.60; `erts-run-test' results inconsistent with batch mode Troy Brown
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).