Skip Menu |
 

This queue is for tickets about the Devel-PerlySense CPAN distribution.

Report information
The Basics
Id: 59179
Status: new
Priority: 0/
Queue: Devel-PerlySense

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: ps/current-test-count vs BEGIN block
Date: Thu, 08 Jul 2010 09:19:39 +1000
To: bug-Devel-PerlySense [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Download (untitled) / with headers
text/plain 691b
In perlysense 0.0183 the emacs test count update doesn't work if the plan is in a BEGIN block like BEGIN { plan tests => 16; } It seems number-at-point in ps/current-test-count returns nil if point is just after the number, if it's within a { } block. Sounds pretty dodgy on emacs part there, but I think ps/current-test-count might better go straight from the match anyway. I get some joy from the following, (defun ps/current-test-count () "Return the test count of the current buffer, or nil if that couldn't be deduced." (save-excursion (goto-char (point-min)) (and (re-search-forward "tests\s+=>\s*\\([0-9]+\\)" nil t) (string-to-number (match-string 1)))))


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.