Prove を quickrun する

元ネタ
http://d.hatena.ne.jp/ruedap/20110225/vim_php_phpunit_quickrun
http://vim-users.jp/2010/09/hack172/


Perl スクリプトを書く時は テストランナーに Prove を使うのでそっちを設定する。

augroup QuickRunUnitTest
  autocmd!
  autocmd BufWinEnter,BufNewFile *test.php set filetype=php.unit
  autocmd BufWinEnter,BufNewFile test_*.py set filetype=python.unit
  autocmd BufWinEnter,BufNewFile *.t set filetype=perl.unit
augroup END
let g:quickrun_config = {}
let g:quickrun_config['php.unit'] = {'command': 'phpunitrunner'}
let g:quickrun_config['python.unit'] = {'command': 'nosetests', 'cmdopt': '-s -vv'}
let g:quickrun_config['perl.unit'] = {'command': 'prove'}


Perl テストコード実行する場合は特に vim から実行していなかったけど、quickrun.vim を使えば画面を分割してくれるので便利!


というわけで、PHP, Python, Perl の各種テスティングフレームワークで quickrun してみるシリーズでした。