From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#27559: 26.0.50; [PATCH] Add tests for cl-macs.el Date: Mon, 03 Jul 2017 14:23:39 -0600 Message-ID: <874luti81g.fsf@lylat> References: <87zicmxdyl.fsf@lylat> <87o9t1c0vm.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499113512 25172 195.159.176.226 (3 Jul 2017 20:25:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2017 20:25:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27559@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 03 22:25:07 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 1dS7u7-0006F8-Js for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 22:25:07 +0200 Original-Received: from localhost ([::1]:37168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS7uD-0007Xi-2O for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 16:25:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS7u7-0007W3-Pw for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 16:25:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dS7u2-0007PZ-NF for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 16:25:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dS7u2-0007PG-H6 for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 16:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dS7u2-0003HT-8i for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 16:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2017 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27559-submit@debbugs.gnu.org id=B27559.149911348612585 (code B ref 27559); Mon, 03 Jul 2017 20:25:02 +0000 Original-Received: (at 27559) by debbugs.gnu.org; 3 Jul 2017 20:24:46 +0000 Original-Received: from localhost ([127.0.0.1]:50806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS7tm-0003Gv-1I for submit@debbugs.gnu.org; Mon, 03 Jul 2017 16:24:46 -0400 Original-Received: from mail-io0-f176.google.com ([209.85.223.176]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS7tk-0003Gi-AE for 27559@debbugs.gnu.org; Mon, 03 Jul 2017 16:24:44 -0400 Original-Received: by mail-io0-f176.google.com with SMTP id h64so62016967iod.0 for <27559@debbugs.gnu.org>; Mon, 03 Jul 2017 13:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=tivDXzcPAT0OSSvpUa9bMDz2vwdD/nXqLObmQJVCROM=; b=Kjndh20+6MRyqNSTpn6p6VNHjZQfGJCjZlqQbj+LiIhaqsXlPw+DBWFW0Zgt6KcafZ YJ4hOuNPj/6IDmRivC5njE1QH1QylDXl8mePM6Bp9c21PH5G7K19wnOpSMCC4S+6EKfI MDNKtYnEC+Fk1/z9w/RG2EEbTMokymiXEQmtfwsqGyJyL/US8WgZsU+ZTlFxFNmyj9OM ZzJY26Zr/xzzMlUPojuaN3oWnNnP7J2PIgBdjRIijrSWB2w6xaxZTR/2GULZq6Tq0cf/ oHXOsKnmulyWXwayMDwgIcpoa3sEILRiHzX+AqcxAJNcRZWEfgwiAaAytGA3+03k1Uli tBew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=tivDXzcPAT0OSSvpUa9bMDz2vwdD/nXqLObmQJVCROM=; b=VZUISIsyB/sghlBhwDiAWL4mbZ3pauYwFwy7DCO56aiffkSuloWHYP7VncjSOuX5i+ pRCMeQ6Ie8QSrYGn7xjqij2nv/nZ3pHOfuwZJ2dE/v2OS3x5rhDY1m7bHlApK0qLz4ym fbLTxTWN/qTH3uc5j2x9LqvwmgVn+p0iQLc4MiDjTUBFbHeNqf0WpyAnzRzhHBECQ6n3 ZDe7vN++Sv7ku4oXPgLnBSIjXnf7BSxsJNhMRMsFXEuI+GOpdtV8gqEWSdd0FB85bArV 4cX8XSliqwI+JYpUYrv/TPL9QKKjjI03kmH0dI43R4Txj6JZi9mSQF+5cZMfKm7h/FHh BTRg== X-Gm-Message-State: AKS2vOyDDR9h3QB8Kc41I2eSGTCsyi76gozQWnE8Ef69GG7w8Mk8kgpd GW/sxGiQOc3wuO4p X-Received: by 10.107.9.137 with SMTP id 9mr39043699ioj.131.1499113478204; Mon, 03 Jul 2017 13:24:38 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id t7sm11174145ita.1.2017.07.03.13.24.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2017 13:24:37 -0700 (PDT) In-Reply-To: <87o9t1c0vm.fsf@calancha-pc> (Tino Calancha's message of "Mon, 03 Jul 2017 18:42:37 +0900") 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:134144 Archived-At: Tino Calancha writes: > Alex writes: > >> This initial version just includes tests for cl-loop, many of which were >> adapted from Common Lisp the Language 2nd Edition. They are mostly >> ordered by their appearance in the Hyperspec. >> >> When I was just about finished I realized that I could have just used an >> ert wrapper macro to avoid all of the (eval (quote ...))) business, >> which would have the added bonus of easily evaluating most of the tests >> lexically. Should I redo it in this way? > > Thanks! It's very good having all those tests. > I think we can avoid many of the (eval (quote ...)). > In the following patch, i keep just those (eval (quote ...) > where the expansion of `cl-loop' throws an error: That's more or less what I did at first, but I figured since cl-loop is a large macro, that it's best to quote the macro so that an accidental error doesn't halt testing. I actually asked about this in emacs-devel[1] a couple weeks ago, but no one responded. For instance, some for-as-arith tests that aren't marked as should-error currently error in master. As an example, (cl-loop for i above 0 by 2 downfrom 10 collect i) should work, but it errors. I have a working patch for these, but I wanted to make the tests first. It would be nice if the ert tests in general could just continue on with testing even if there are macro-expansion errors. Footnotes: [1] https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00461.html