PATCH: added new Test::Unit compiler plugin
Doug Kearns
djkea2 at mugca.its.monash.edu.au
Wed May 5 03:02:42 EDT 2004
On Sat, May 01, 2004 at 01:00:03PM -0400, Sam Roberts wrote:
> Quoteing djkea2 at mugca.its.monash.edu.au, on Sat, May 01, 2004 at 03:57:44PM +1000:
> > On Fri, Apr 30, 2004 at 11:16:45PM -0400, Sam Roberts wrote:
> > Can't you just have something like:
> >
> > -- Makefile --
> > test:
> > ruby test_vim.rb
> > --------------
> >
> > % make test
>
> That's exactly what I do, except I run make from inside vim, and your
> rubyunit.vim sets makeprg=ruby, and I want makeprg to be make, the
> genuine article!
Well, why not set it to the genuine article?
:compiler rubyunit
:setlocal makeprg=make
If you like you can add this to one of the appropriate runtime files.
Maybe something like:
-- ~/.vim/after/ftplugin/ruby.vim --
compiler rubyunit
setlocal makeprg=make
------------------------------------
Or you could write your own compiler plugin using the 'efm' from
rubyunit.vim and setting 'makeprg' to make.
I fear I am missing something... ;-)
> > You might also be interested in rake.rubyforge.org.
>
> Not even a little bit... make is a great tool, I don't believe that
> every tool would be better if written in ruby.
I only suggested it since you asked how to "modify the test/unit" which
I didn't quite understand but read to mean that you wanted to modify the
Test::Unit library. I assume this would probably be easier from Rake.
> And:
>
> rule '.o' => ['.c'] do |t|
> sh "cc #{t.source} -c -o #{t.name}"
> end
>
> appears no simpler than
>
> %.o: %.c
> cc -c -o $<
>
> to my eyes. Maybe I should squint harder. :-)
I'd have to agree, but I actually use neither - I use
http://a-a-p.sf.net/ instead! :-)
Regards,
Doug
More information about the vim-ruby-devel
mailing list