Created
November 15, 2017 17:18
-
-
Save jonbri/9eb77f19945872cb831d37eec8a5aa1b to your computer and use it in GitHub Desktop.
Blank template for VimScript/Vader testing
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
" Blank template for Vader testing | |
" Invoke with `:Vader` | |
" Resources: | |
" https://github.com/junegunn/vader.vim | |
" https://junegunn.kr/2013/10/testing-vimscript-with-vader-vim | |
Before; | |
function! FooBecomesBar() | |
:silent! %s/foo/bar/ | |
endfunction | |
nnoremap c( :call FooBecomesBar()<CR> | |
Given(); | |
foo() | |
Do: | |
c( | |
Expect; | |
bar() | |
Given(); | |
foo() | |
Execute: | |
call FooBecomesBar() | |
Expect; | |
bar() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment