From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#24402: should-error doesn't catch all errors Date: Thu, 20 Jul 2017 12:23:25 -0700 Message-ID: <87bmoehpzm.fsf@runbox.com> 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> <87lgntdswo.fsf@users.sourceforge.net> <87k23d9gvt.fsf@lylat> <87d195dmr0.fsf@users.sourceforge.net> <87lgns7y7g.fsf@lylat> <877ezbew3d.fsf@users.sourceforge.net> <87d193ljdp.fsf@lylat> <87shhxcqit.fsf@users.sourceforge.net> <87inithwi5.fsf@lylat> <87eftcglz3.fsf@runbox.com> <87y3rk9gfa.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1500578664 26367 195.159.176.226 (20 Jul 2017 19:24:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 19:24:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24402@debbugs.gnu.org, Alex , Tino Calancha To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 20 21:24:13 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 1dYH3O-0005wm-TI for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 21:24:07 +0200 Original-Received: from localhost ([::1]:39650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYH3U-00060F-28 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2017 15:24:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYH3O-000608-9V for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 15:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYH3K-0007kN-9F for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 15:24:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYH3J-0007jk-Ts for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 15:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dYH3J-0005jQ-Ny for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2017 15:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2017 19:24:01 +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.150057863222013 (code B ref 24402); Thu, 20 Jul 2017 19:24:01 +0000 Original-Received: (at 24402) by debbugs.gnu.org; 20 Jul 2017 19:23:52 +0000 Original-Received: from localhost ([127.0.0.1]:50032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYH39-0005ix-N3 for submit@debbugs.gnu.org; Thu, 20 Jul 2017 15:23:52 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:41808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYH37-0005in-IR for 24402@debbugs.gnu.org; Thu, 20 Jul 2017 15:23:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=ngknYz6HSFN6AxbRCgpqoQVxW7qvfUY9b52FahD9qN0=; b=b1dy/tCai8By7czUuJwIWZ+5cb hp00t9pHzKCOxcXtZLYUrbcIeQdvJ4kKp+dMd1lpFUQg16/7arNItw8XCChv+gCOUoQpRCu31yZq9 qWZ0dMj4nQicLHG/kG4lXaWoRVo8xGZkDSj69EtEC9GlNK5mtkizm+yd60A1bvPZIBKMoBBO7vMdT g0SwoMbYD7ASrKHG64EtJHlAlvbFxb2gpcT3gPIOYgifVm4arAn9cmcUjN7t26zV8DVek2QWKif7u U2TdAvF8ivoTBL5DATzFoYvzj9NOljjbZzljuDaL0AIlNU/44hjCx2BhMXR1sMkAL2h+89SBmKDar gaCbcRFg==; Original-Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dYH34-0002Tt-VD; Thu, 20 Jul 2017 21:23:47 +0200 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=chinook) by mailfront11.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1dYH2m-0006hO-9S; Thu, 20 Jul 2017 21:23:28 +0200 In-Reply-To: <87y3rk9gfa.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Wed, 19 Jul 2017 19:04:57 -0400") 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:134796 Archived-At: --=-=-= Content-Type: text/plain npostavs@users.sourceforge.net writes: > The following appears to fix it, though perhaps we should use a smarter > equal function that would consider the circular lists to actually be > equal instead of bailing out and returning nil on circularity. Thanks for tracking this one down and making a patch, which looks good to me. Does that smarter equal function already exist? It doesn't seem worth the effort of writing one for this purpose only. Here is a test to add to your patch, which fails without it and passes with it: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Add-a-test-of-handling-of-circular-values-to-testcov.patch >From f401e3169ff3887b8215b6625d111d70e5340efe Mon Sep 17 00:00:00 2001 From: Gemini Lasswell Date: Thu, 20 Jul 2017 12:01:42 -0700 Subject: [PATCH] Add a test of handling of circular values to testcover-tests * test/lisp/emacs-lisp-testcover-resources/testcases.el (testcover-testcase-cyc1): New function. (testcover-tests-circular-lists-bug-24402): New test. --- test/lisp/emacs-lisp/testcover-resources/testcases.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/lisp/emacs-lisp/testcover-resources/testcases.el b/test/lisp/emacs-lisp/testcover-resources/testcases.el index 1eb791a993..c9a5a6daac 100644 --- a/test/lisp/emacs-lisp/testcover-resources/testcases.el +++ b/test/lisp/emacs-lisp/testcover-resources/testcases.el @@ -490,4 +490,14 @@ testcover-testcase-how-do-i-know-you (should (eq (testcover-testcase-how-do-i-know-you "Liz") 'unknown)) +;; ==== circular-lists-bug-24402 ==== +"Testcover captures and ignores circular list errors." +;; ==== +(defun testcover-testcase-cyc1 (a) + (let ((ls (make-list 10 a%%%))) + (nconc ls ls) + ls)) +(testcover-testcase-cyc1 1) +(testcover-testcase-cyc1 1) + ;; testcases.el ends here. -- 2.12.2 --=-=-=--