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

Owner: Nobody in particular
Requestors: user42 [...]

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 [...]
From: Kevin Ryde <user42 [...]>
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 infrastructure.

Please report any issues with to