Created
August 4, 2008 03:32
-
-
Save hotchpotch/3854 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists("g:perl_test_class_test") | |
finish | |
endif | |
let g:perl_test_class_test = 1 | |
function! s:PerlTestClassMethodRun() | |
let re = '\vsub\s+(\w+)\s*:\s*Test' | |
let line = search(re, 'bn') | |
if line | |
let res = matchlist(getline(line), re) | |
execute '!TEST_METHOD="' . res[1] . '" /usr/bin/env perl -MP -w %' | |
endif | |
endfunction | |
nmap ,t :call <SID>PerlTestClassMethodRun()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment