From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24402: should-error doesn't catch all errors Date: Wed, 12 Jul 2017 21:31:19 -0400 Message-ID: <87lgntdswo.fsf@users.sourceforge.net> References: <3654D8E9-D3CB-402B-922F-B132C1871E9F@runbox.com> <596E65D2-E780-43A1-A75B-603B61B6F9F4@runbox.com> <87zickhoco.fsf_-_@lylat> <877eznda7v.fsf@lylat> <874lur0zki.fsf@calancha-pc> <87o9sywtbz.fsf@lylat> <87fue3f9p8.fsf@users.sourceforge.net> <87vamyl3j3.fsf@lylat> <87tw2het1b.fsf@users.sourceforge.net> <874luhbo4l.fsf@lylat> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499909414 7736 195.159.176.226 (13 Jul 2017 01:30:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2017 01:30:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: Gemini Lasswell , 24402@debbugs.gnu.org, Tino Calancha To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 13 03:30:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSxD-0001co-Pg for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 03:30:07 +0200 Original-Received: from localhost ([::1]:56767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVSxJ-0004nL-71 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 21:30:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVSxD-0004mC-5X for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVSx9-00085a-Vf for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33315) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVSx9-00084d-QL for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVSx9-0004YW-8w for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 01:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 24402-submit@debbugs.gnu.org id=B24402.149990939717472 (code B ref 24402); Thu, 13 Jul 2017 01:30:03 +0000 Original-Received: (at 24402) by debbugs.gnu.org; 13 Jul 2017 01:29:57 +0000 Original-Received: from localhost ([127.0.0.1]:35992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSx2-0004Xk-Lb for submit@debbugs.gnu.org; Wed, 12 Jul 2017 21:29:56 -0400 Original-Received: from mail-it0-f53.google.com ([209.85.214.53]:38143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSx0-0004XV-AX for 24402@debbugs.gnu.org; Wed, 12 Jul 2017 21:29:54 -0400 Original-Received: by mail-it0-f53.google.com with SMTP id k192so29792733ith.1 for <24402@debbugs.gnu.org>; Wed, 12 Jul 2017 18:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sxQ1SktwsJ3F1AMgCcUE/9uQBYYWhlLZkmOUHXXDz7Q=; b=aHnOtmG4gmCTUP/8UCNi/qxzlXg8DK133YU9P9q90txKKRFrB+aWTIZbTJiP6YKoTw Z3Qu+wqBFI86M1m8ji7oz5dpaD8SqPDPJ+keqXMzGJPeTM2hQ5YCpx6Oa348X/qn5D47 iTQlfVqXDshlta2n5mcubD0ABwF7s5/UKsNoVDej9GmoSVbBeJFiHDWnkq9o55MjGFyI +tRksGzheX0o1C+jOd6dKxRI0iY/SON5qy6LwBGzDLI2jYpDDjvhiJpRH1RJEI1QlvQW emswCfK+5sW43MPwY5B7XRP/UBio54mYxhwPOcaacWncjGxoxT4icpqBFlGNEuylRcXi D0Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=sxQ1SktwsJ3F1AMgCcUE/9uQBYYWhlLZkmOUHXXDz7Q=; b=bXr8Ce2m6eujFSZeWjERPEYYGc5keTPwpa6qjZJnuyxDsn/WVWL1+zSPUetc6eZaO1 +Ao1XyWUAKUfcs+dwx6Bg9jjDgIHkT6YURhAFz5rKhwL5jSV1EhxsLHL+JTW5azPkea+ PzwSIA58Pf5OvggKN2+2EjIM6HO24/eaGwdExdN8THn/UwZarT/tWdZVmu80o4dxpprB yUnuUnWOoP7Mn39aJlrVd3JkAsuiz18fVWKgB3HfvSU7B506v6qNhMGvlqx8e2Dg+aDy 3Op8SSYF6IVFwqb5Toh0Bm3OHeZYjl4hw3fMDvJAagJQKlR7s6ILkBubLGRMUdy7TXmB pWug== X-Gm-Message-State: AIVw113ZzWh1x35tz0N4v+KqPcqh10KcKZkh0bCY5cSSBq8EgFrDBVQX 2MvKqRkOGnB0+w== X-Received: by 10.36.71.79 with SMTP id t76mr11775943itb.118.1499909388629; Wed, 12 Jul 2017 18:29:48 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 66sm2400534ioj.47.2017.07.12.18.29.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jul 2017 18:29:46 -0700 (PDT) In-Reply-To: <874luhbo4l.fsf@lylat> (Alex's message of "Wed, 12 Jul 2017 10:45:14 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134488 Archived-At: Alex writes: > npostavs@users.sourceforge.net writes: > >> Does it also work when loading the elc version of the test file? (try >> 'make check TEST_LOAD_EL=no') > > Oh, it doesn't load the elc version by default? That's surprising; I > think that should be documented in the test README. > > I get 3 test failures with TEST_LOAD_EL=no, but I don't believe they're > because of me. On a mostly clean master (d014a5e15) those 3 also error. > One of them is simple to fix (the (require 'subr-x) should not be inside > eval-when-compile in dom-tests). Ah, the `should' blocks inlining during compilation. Is that necessary? Probably yes if we expect to catch errors during macroexpansion I guess. > The other failing tests are > subr-test-backtrace-integration-test and cl-lib-defstruct-record. Hmm, I'll see if I can fix these. >> What about tests like this? >> >> (ert-deftest check-error-handling () >> (should >> (eq 42 >> (condition-case () >> (/ 1 0) >> (arith-error 42))))) > > It works for me, yes. As long as `debugger' is set to a symbol. I can > make it a bit more robust by using an additional defvar in > ert--run-test-internal. > > Are you asking because it doesn't work for you? No, I'm just trying to explore the edges of this solution. Isn't `debugger' bound to a non-symbol while running the the tests? I'm confused as to why this solution works.