On Tue, Aug 17, 2004 at 01:08:48PM +0900, Hal Fulton wrote:
> I'd really like to have a vim-like editor scriptable in
> Ruby, so I hope to contribute test cases at the very least.

ruvi is already pretty much fully unit tested though (23 tests, ~ 300 asserts)
some areas need quite a bit more testing before i'll be
happy with them.
   
rendering/syntax highlighting tests have been acomplished
by writing a test-only frontend which allows dumping of the 
screen data to an output file. my arch repository holding 
ruvi contains a number of important rendering test cases, 
however there aren't many as previously i was using yaml 
rather than Marshal for the testcasing and it would take 
over 3 to 4 seconds per dump, which made large suites of 
rendering testcases completely infeasible (admittedly 
very large suites are impossible anyway due to the number
of files that would involve, .

my common coding cycle goes like this:
   write test for new feature
   disable all others, enable this one
   code until testcases all work
   renable all tests
   fix possible interaction bugs
in the case of syntax highlighting:
   write test for new case
   disable all others, enable this one
   while not_done
      rm renderings/my_new_test
      ruby testcasees.rb # now that renderings output is no longer
                         # present the testsuite will create it rather 
#                        # than comparing it
      display_rendering
      my_new_test
   end
   renable tests and fix interaction bugs

the ability to write test cases and still see the screen
rendering is just awesome its massively improved the speed
at which i can hack something in :)

if anyone has a key sequence that is missing, please add
it to the page:

   http://ruvi.rubyforge.org/wiki/wiki.pl?UnimplementedKeySequences

i'll add the list that various people have already contributed
as soon as i wake up from a quick nap :)

> This way, a test simply becomes a block of text, something easy
> to communicate back and forth.

interesting idea but i'm not sure of the need to
involve vim really. the tests can be created with vim
usage in mind but i doubt vim will be very easily 
testable in this manner. otoh, it would be nice to 
know that all my testcases are correct so some
peer review on this would be really nice :)

mvg,
Alex