unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
@ 2010-02-20  0:15 Kevin Ryde
  2012-12-02  6:11 ` Chong Yidong
  2016-02-28  6:10 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Ryde @ 2010-02-20  0:15 UTC (permalink / raw)
  To: 5607

[-- 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=''

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
  2010-02-20  0:15 bug#5607: 23.1; compile error regexps for perl test scripts, mark 2 Kevin Ryde
@ 2012-12-02  6:11 ` Chong Yidong
  2012-12-06 22:34   ` Kevin Ryde
  2016-02-28  6:10 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2012-12-02  6:11 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 5607

Kevin Ryde <user42@zip.com.au> writes:

> 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".

Sorry for the very late response.

With your patch, the following line from the old compile.txt is no
longer correctly highlighted:

# Test 6 got: "xx" (foo.t at line 33 fail #2)

Is that a valid compilation message?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
  2012-12-02  6:11 ` Chong Yidong
@ 2012-12-06 22:34   ` Kevin Ryde
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2012-12-06 22:34 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5607

Chong Yidong <cyd@gnu.org> writes:
>
> With your patch, the following line from the old compile.txt is no
> longer correctly highlighted:
>
> # Test 6 got: "xx" (foo.t at line 33 fail #2)
>
> Is that a valid compilation message?

Yes.  It should be matched.  My latest and greatest seems to do so
( http://user42.tuxfamily.org/compilation-perl/index.html ).  I'll try
to double check what I posted.


Incidentally, the "cucumber" pattern of the emacs24 seems to match the
perl test intro

# Current time local: Wed Aug 15 12:04:58 2012

I wondered if the cucumber "#" bit might be tightened up.  Maybe its "#"
is never at the start of a line, or something like that.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
  2010-02-20  0:15 bug#5607: 23.1; compile error regexps for perl test scripts, mark 2 Kevin Ryde
  2012-12-02  6:11 ` Chong Yidong
@ 2016-02-28  6:10 ` Lars Ingebrigtsen
  2019-06-27 17:24   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-28  6:10 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 5607

Kevin Ryde <user42@zip.com.au> writes:

> 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>
>
> 	* compilation.txt (Perl Test module, Perl Test::Harness): Replace
> 	for new perl--Test and perl--Test-failed symbols.
>
>     (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.

[...]

> Yes.  It should be matched.  My latest and greatest seems to do so
> ( http://user42.tuxfamily.org/compilation-perl/index.html ).  I'll try
> to double check what I posted.
>
> Incidentally, the "cucumber" pattern of the emacs24 seems to match the
> perl test intro
>
> # Current time local: Wed Aug 15 12:04:58 2012
>
> I wondered if the cucumber "#" bit might be tightened up.  Maybe its "#"
> is never at the start of a line, or something like that.

It's been three years again, so it's time to revisit this bug report.
:-)

If this is still an issue, can you provide a patch for this instead of
code fragments?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5607: 23.1; compile error regexps for perl test scripts, mark 2
  2016-02-28  6:10 ` Lars Ingebrigtsen
@ 2019-06-27 17:24   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 17:24 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: 5607

Lars Ingebrigtsen <larsi@gnus.org> writes:

> It's been three years again, so it's time to revisit this bug report.
> :-)
>
> If this is still an issue, can you provide a patch for this instead of
> code fragments?

And yet another three years have passed, so I progress seems unlikely on
this bug report, and I'm closing it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-27 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-20  0:15 bug#5607: 23.1; compile error regexps for perl test scripts, mark 2 Kevin Ryde
2012-12-02  6:11 ` Chong Yidong
2012-12-06 22:34   ` Kevin Ryde
2016-02-28  6:10 ` Lars Ingebrigtsen
2019-06-27 17:24   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).