Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Thanks to smylers for helping me work out the new vim command I have.
The problem is that when I'm working on Test::Class tests, I often only want to run one test method. So I wrote
noremap
,tc0 :%s/^\s*sub\s\+\w\+[^:]*:.*Test.*{.*$/& ;return;<cr>
noremap,tc1 :%s/^\v(\s*sub\s+\w+[^:]*:.*Test.*\{.*) ;return;/\1/<cr>
Those look OK (the second one is subtly different syntax as I'm in the process of rewriting this), but there's a bug. Basically, the first one adds a 'return' at the beginning of test methods, forcing them to skip. I manually remove the return for the test method I want and when I'm done, I run
" automatically source the
.vimrc file if I change it
au! BufWritePost.vimrc source %
Update: It looks like the vim mappings I wanted were as follows:
noremap
,tc0 :%s/^\v\s*sub\s+\w+[^:]*:.*Tests?\s*(\(\s*(no_plan\|\d+)\s*\))?\s*\{.*$/& ;return;<cr>
noremap,tc1 :%s/^\v(\s*sub\s+\w+[^:]*:.*Test.*\{.*) ;return;/\1/<cr>
My new vim command 0 Comments More | Login | Reply /