all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gemini Lasswell <gazally@runbox.com>
To: Alex <agrambot@gmail.com>
Cc: npostavs@users.sourceforge.net,
	Tino Calancha <tino.calancha@gmail.com>,
	24402@debbugs.gnu.org
Subject: bug#24402: should-error doesn't catch all errors
Date: Wed, 19 Jul 2017 14:23:12 -0700	[thread overview]
Message-ID: <87eftcglz3.fsf@runbox.com> (raw)
In-Reply-To: <87inithwi5.fsf@lylat> (Alex's message of "Sat, 15 Jul 2017 21:49:06 -0600")

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hello,

First, thank you for working on this bug!

I have a branch of Emacs which attempts to run all the tests under
Testcover, and I've tried it with Alex's latest patch. The patch has
fixed the problems with Testcover and should-error except for one weird
case. Here is a file that will let you reproduce the weird case on
master with the patch applied:


[-- Attachment #2: cyc-test.el --]
[-- Type: text/plain, Size: 449 bytes --]

(defun cyc1 (a)
  (let ((ls (make-list 10 a)))
    (nconc ls ls)
    ls))

(ert-deftest test-cycle-assq ()
  (let ((c1 (cyc1 '(1))))
    (should-error (assq 3 c1) :type 'circular-list)))

(ert-deftest test-cycle-assoc ()
  (let ((c1 (cyc1 '(1))))
    (should-error (assoc 2 c1) :type 'circular-list)))

(defvar testcover-started nil)
(unless testcover-started
  (setq testcover-started t)
  (testcover-start (or load-file-name (buffer-file-name))))

[-- Attachment #3: Type: text/plain, Size: 414 bytes --]


This is an excerpt of test/src/fns-tests.el with a few lines added at
the end to invoke Testcover. It contains two nearly identical tests
which should both pass, but one passes and one fails. If you then edit
the file and comment out test-cycle-assoc (the one that passes) and run
the test again, then the failing test will pass. I've reproduced it both
in batch mode (without TEST_LOAD_EL=no) and interactively.

  parent reply	other threads:[~2017-07-19 21:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10  1:26 bug#24402: 25.1.50; testcover-start breaks should-error Gemini Lasswell
     [not found] ` <handler.24402.B.14734739098199.ack@debbugs.gnu.org>
2016-09-20  4:27   ` bug#24402: More Information Gemini Lasswell
2017-07-04  3:28     ` bug#24402: should-error doesn't catch all errors (Was:bug#24402: More Information) Alex
2017-07-05  0:00       ` bug#24402: should-error doesn't catch all errors Alex
2017-07-05 13:43         ` Tino Calancha
2017-07-05 19:56           ` Alex
2017-07-07 10:15             ` Tino Calancha
2017-07-09  7:04               ` Alex
2017-07-11 12:18             ` npostavs
2017-07-12  3:47               ` Alex
2017-07-12 12:30                 ` npostavs
2017-07-12 16:45                   ` Alex
2017-07-13  1:31                     ` npostavs
2017-07-13  3:04                       ` Alex
2017-07-13  3:44                         ` npostavs
2017-07-13 22:45                           ` Alex
2017-07-13 23:49                             ` npostavs
2017-07-14  4:42                               ` Alex
2017-07-14  4:45                                 ` Alex
2017-07-15 21:57                                 ` npostavs
2017-07-16  3:49                                   ` Alex
2017-07-17  0:46                                     ` npostavs
2017-07-19 21:23                                     ` Gemini Lasswell [this message]
2017-07-19 22:40                                       ` Alex
2017-07-19 23:04                                       ` npostavs
2017-07-20  4:04                                         ` Alex
2017-07-20 19:23                                         ` Gemini Lasswell
2017-08-08  1:15                                           ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eftcglz3.fsf@runbox.com \
    --to=gazally@runbox.com \
    --cc=24402@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.