On Sun, Aug 18, 2002 at 03:45:00AM +0900, Massimiliano Mirra wrote:
> On Sat, Aug 17, 2002 at 10:49:20AM +0900, Jim Weirich wrote:
> >     Holden> built in source control
> >     Holden> built in refactorings - even simple things like rename method and having 
> >     Holden> that propagated throughout your code base is a _huge_ help IMHO.
> > 
> > Ummmm ... Emacs can do all of those things (except refactoring, and
> 
> How do you run tests and then jump to offending lines?  I use to run
> tests with just a keypress by writing them in the same file they test
> within a if __FILE__ == $0 ... end block and then eval'ing the buffer,
> but I get another buffer with Test::Unit results as plain program
> output, not anything that Emacs parses go get anchors.
> 
> Massimiliano

I've been running my unit tests from a makefile, which triggers
the output to be a compilation buffer which does jump to lines.

The only wrinkle is that Test::Unit inserts leading whitespace
into the line numbers. My hackish solution was to pipe the
standard error through a filter to remove leading whitespace.

## makefile
RBTE= ruby -e "while( (line=gets())!=nil); puts line.strip; end"

test :
	ruby -w tc_unittest.rb 2>&1 | $(RBTE)
## end of makefile


It doesn't trap all lines, but I've been meaning to make it a full blown filter
which recognizes some of occasional backtraces which have lines starting
with: 
from file.rb:line:


-- 
Alan Chen
Digikata LLC
http://digikata.com