Last active
June 2, 2016 13:45
-
-
Save wsdjeg/dffa5280d15e2c1e347051ef3e372a02 to your computer and use it in GitHub Desktop.
TestFunc
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
function! TestFunction() | |
let lnum = line(".") | |
let col = col(".") | |
let func = getline(search("\\h\\+\\s\\+\\h\\+\\s*(.*)", 'bW')) | |
let func = substitute(func, '\v(public|protected|private|function)', '', 'g') | |
let func = substitute(func, '()', '', 'g') | |
let func = substitute(func, ' ', '', 'g') | |
let cmd = "phpunit " . expand('%:p') ." --filter " . func | |
let output = systemlist(cmd) | |
echomsg cmd . join(output) | |
call search("\\%" . lnum . "l" . "\\%" . col . "c") | |
endfun | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment