From: Kevin Ryde <user42@zip.com.au>
To: 5607@debbugs.gnu.org
Subject: bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
Date: Sat, 20 Feb 2010 11:15:14 +1100 [thread overview]
Message-ID: <87635srcdp.fsf@blah.blah> (raw)
[-- Attachment #1: Type: text/plain, Size: 896 bytes --]
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 <user42@zip.com.au>
* 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 <user42@zip.com.au>
* compilation.txt (Perl Test module, Perl Test::Harness): Replace
for new perl--Test and perl--Test-failed symbols.
[-- Attachment #2: compile.el.perl.fragment --]
[-- Type: text/plain, Size: 1833 bytes --]
(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)
[-- Attachment #3: compilation.txt --]
[-- Type: text/plain, Size: 1002 bytes --]
* 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.
[-- Attachment #4: Type: text/plain, Size: 733 bytes --]
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=''
next reply other threads:[~2010-02-20 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-20 0:15 Kevin Ryde [this message]
2012-12-02 6:11 ` bug#5607: 23.1; compile error regexps for perl test scripts, mark 2 Chong Yidong
2012-12-06 22:34 ` Kevin Ryde
2016-02-28 6:10 ` Lars Ingebrigtsen
2019-06-27 17:24 ` Lars Ingebrigtsen
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=87635srcdp.fsf@blah.blah \
--to=user42@zip.com.au \
--cc=5607@debbugs.gnu.org \
/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.