From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#5607: 23.1; compile error regexps for perl test scripts, mark 2 Date: Sat, 20 Feb 2010 11:15:14 +1100 Message-ID: <87635srcdp.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1266625413 31252 80.91.229.12 (20 Feb 2010 00:23:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2010 00:23:33 +0000 (UTC) To: 5607@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 20 01:23:18 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid7t-00061h-Mt for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Feb 2010 01:23:18 +0100 Original-Received: from localhost ([127.0.0.1]:58460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nid7t-0003WI-2J for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 19:23:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nid7c-0003Fp-35 for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:23:00 -0500 Original-Received: from [140.186.70.92] (port=47235 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nid7b-0003Dn-0b for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:22:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nid7Y-0005kh-HD for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:22:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47087) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid7Y-0005kY-6A for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:22:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nid0s-0001IS-8p; Fri, 19 Feb 2010 19:16:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Feb 2010 00:16:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5607 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12666249394974 (code B ref -1); Sat, 20 Feb 2010 00:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Feb 2010 00:15:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid0U-0001IA-9F for submit@debbugs.gnu.org; Fri, 19 Feb 2010 19:15:38 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid0R-0001I5-G6 for submit@debbugs.gnu.org; Fri, 19 Feb 2010 19:15:36 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:52197) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid0N-0008CY-Oz for submit@debbugs.gnu.org; Fri, 19 Feb 2010 19:15:31 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nid0L-00028U-Px for submit@debbugs.gnu.org; Fri, 19 Feb 2010 19:15:31 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:54002) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nid0L-00028O-JJ for submit@debbugs.gnu.org; Fri, 19 Feb 2010 19:15:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nid0L-0000X3-3h for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:15:29 -0500 Original-Received: from [140.186.70.92] (port=34157 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nid0J-0000V9-S0 for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:15:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nid0I-00050C-JM for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:15:27 -0500 Original-Received: from mailout1-2.pacific.net.au ([61.8.2.209]:53877 helo=mailout1.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nid0H-0004zz-HE for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 19:15:26 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 4D14D52831E for ; Sat, 20 Feb 2010 11:15:23 +1100 (EST) Original-Received: from blah.blah (ppp2048.dyn.pacific.net.au [61.8.32.72]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 3E8742740F for ; Sat, 20 Feb 2010 11:15:22 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1Nid06-0001Ey-VP for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2010 11:15:15 +1100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 19 Feb 2010 19:16:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35205 Archived-At: --=-=-= I eventually got around to revisiting the compile error regexps I made for perl test scripts in my compilation-perl.el. I was misguided about the "NOK" business of the perl--Test::Harness one that's now in emacs. I believe the three symbols perl--Test, perl--Test2 and perl--Test::Harness can be replaced by the two simpler bits of compile.el.perl.fragment below. compilation.txt fragment below too, to replace the two sections "* Perl Test module error messages" and "* Perl Test::Harness output". 2010-02-20 Kevin Ryde * progmodes/compile.el (compilation-error-regexp-alist-alist): Replace/amend perl--Test, perl--Test2 and perl--Test::Harness with better patterns perl--Test and perl--Test-failed. 2010-02-20 Kevin Ryde * compilation.txt (Perl Test module, Perl Test::Harness): Replace for new perl--Test and perl--Test-failed symbols. --=-=-= Content-Disposition: attachment; filename=compile.el.perl.fragment (perl--Test ;; Test.pm ok() message when comparing got/want values (printed in ;; its _complain()), ;; ;; # Test 2 got: "xx" (t-compilation-perl-2.t at line 10) ;; ;; And under Test::Harness can be preceded by progress stuff so ;; allow match anywhere in the line. ;; ;; ... NOK 1# Test 1 got: "1234" (t/foo.t at line 46) ;; "# Test [0-9]+ got:.* (\\([^ \t\r\n]+\\) at line \\([0-9]+\\))" 1 2) (perl--Test-failed ;; Test.pm and Test::Builder fail messages. ;; Test.pm ok() function on a plain boolean test gives, ;; ;; # Failed test 1 in foo.t at line 6 ;; ;; And Test::Builder (eg. module version 0.94, and as used for ;; instance by Test::More) gives similar in its ok(). The # is ;; added by Test::Builder diag(). Eg. with no test name, ;; ;; # Failed test in foo.t at line 5. ;; ;; Or with a test name, ;; ;; # Failed test 'my name' ;; # in foo.t at line 5. ;; ;; Or with a multi-line name, ;; ;; # Failed test 'my name ;; # blah ;; # ' ;; # in foo.t at line 5. ;; ;; Both Test and Test::Harness can be preceded by a progress part ;; from Test::Harness, so match anywhere in the line, eg. ;; ;; ../devel/d-compilation-perl.t .. 1/1 # Failed test 1 in ../devel/d-compilation-perl.t at line 27 ;; ;; A Test::Builder message "# Failed (TODO) test" is deliberately ;; not matched, since a test flagged as TODO isn't an error. If ;; you want to match that you can slip a "\\( (TODO)\\)?" into the ;; pattern (perhaps classing it as a warning). ;; "# +Failed test.*?\\(\n#.*?\\)*? +in \\([^ \t\r\n]+\\) at line \\([0-9]+\\)" 2 3) --=-=-= Content-Disposition: attachment; filename=compilation.txt * Perl test scripts In the following the raw .t output gives messages at the start of the line, but Test::Harness ends up prefixing them with its progress print. The exact text of that prefix varies a little between Test::Harness versions but is unmatched. symbol: perl--Test # Test 2 got: "123" (t-compilation-perl.t at line 6) NOK 1# Test 1 got: "1234" (t/foo.t at line 46) symbol: perl--Test-failed The following from Test.pm module, # Failed test 1 in foo.t at line 6 d-compilation-perl....NOK 1# Failed test 1 in d-compilation-perl.t at line 27 ../devel/d-compilation-perl.t .. 1/1 # Failed test 1 in ../devel/d-compilation-perl.t at line 27 The following from Test::Builder, with or without a test name, and even a multi-line test name (multi-line "name"s arise if details like input data are included to identify what test is what), # Failed test in foo.t at line 5. # Failed test 'my name' # in foo.t at line 5. # Failed test 'my name # blah # ' # in foo.t at line 5. --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' --=-=-=--