Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Testing Vimscript with Vimrunner
Paul Mucur
February 26, 2013
Programming
3
160
Testing Vimscript with Vimrunner
Presented at Vim London, a look at how to test-drive Vim plugins using the Vimrunner Ruby gem.
Paul Mucur
February 26, 2013
Tweet
Share
More Decks by Paul Mucur
See All by Paul Mucur
Do you really need breakfast?
mudge
0
92
HyperLogLog in 15 minutes
mudge
0
75
Exploring #to_proc
mudge
0
150
Configuration Management with Puppet
mudge
1
200
Extending Ruby with C
mudge
1
270
Managing Web Application Servers with Puppet
mudge
3
120
Other Decks in Programming
See All in Programming
Amazon ECSのネットワーク関連コストの話
msato
0
670
無限スクロールビューライブラリ 二つの設計思想比較
harumak
0
270
Independently together: better developer experience & App performance
bcinarli
0
190
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
410
Jetpack Composeでの画面遷移
iwata_n
0
200
大規模プロダクトにLinterを導入し運用している話
hirokiotsuka
0
240
競プロのすすめ
uya116
0
680
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @enterjs2022
manfredsteyer
PRO
0
200
【Scrum Fest Osaka 2022】スクラムチームに放り込まれた若手エンジニアの皆さん、どのように技術のキャッチアップをしていくかイメージはついていますか?
miiiki
0
130
#JJUG_CCC 「サポート」は製品開発? - JDBCライブラリ屋さんが実践する攻めのテクニカルサポートとJavaエンジニアのキャリアについて -
cdataj
0
430
リアルタイムボイスチェンジャーMMVCとVITSの紹介
stealthinu
0
160
Meet Swift Regex
usamik26
0
370
Featured
See All Featured
Pencils Down: Stop Designing & Start Developing
hursman
112
9.8k
Ruby is Unlike a Banana
tanoku
91
9.2k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
The Straight Up "How To Draw Better" Workshop
denniskardys
225
120k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
127
8.5k
We Have a Design System, Now What?
morganepeng
35
3k
Documentation Writing (for coders)
carmenhchung
48
2.6k
Clear Off the Table
cherdarchuk
79
280k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
5
520
No one is an island. Learnings from fostering a developers community.
thoeni
9
1.3k
Building a Scalable Design System with Sketch
lauravandoore
448
30k
Transcript
Testing Vimscript with Vimrunner
PAUL MUCUR @mudge
None
Why would I want to test Vimscript?
CAESAR.VIM
None
None
$ vim -‐-‐version VIM -‐ Vi IMproved 7.3 (2010 Aug
15, compiled Feb 16 2013 12:20:10) MacOS X (unix) version Included patches: 1-‐754 Compiled by mudge@wintermute.local Huge version with MacVim GUI. Features included (+) or not (-‐): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -‐cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -‐ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -‐footer +fork() +fullscreen -‐gettext -‐hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -‐lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -‐mouse_gpm -‐mouse_jsbterm +mouse_netterm +mouse_sgr -‐mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang -‐mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -‐python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -‐sniff +startuptime +statusline -‐sun_workshop +syntax +tag_binary +tag_old_static -‐tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -‐X11 -‐xfontset +xim -‐xsmp -‐xterm_clipboard -‐xterm_save
$ vim -‐-‐version VIM -‐ Vi IMproved 7.3 (2010 Aug
15, compiled Feb 16 2013 12:20:10) MacOS X (unix) version Included patches: 1-‐754 Compiled by mudge@wintermute.local Huge version with MacVim GUI. Features included (+) or not (-‐): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -‐cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -‐ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -‐footer +fork() +fullscreen -‐gettext -‐hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -‐lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -‐mouse_gpm -‐mouse_jsbterm +mouse_netterm +mouse_sgr -‐mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang -‐mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -‐python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -‐sniff +startuptime +statusline -‐sun_workshop +syntax +tag_binary +tag_old_static -‐tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -‐X11 -‐xfontset +xim -‐xsmp -‐xterm_clipboard -‐xterm_save
Demonstration of Vim’s client-server functionality
None
vim = Vimrunner.start vim.edit("foo.txt") vim.insert("Hello world!") vim.write
Demonstration of using Vimrunner to remote control Vim from Ruby
describe "caesar.vim" do it "converts 1 to I" do
expect(vim.echo("caesar#ToRoman(1)")).to eq("I") end end
Demonstration of test- driving Vim script with Vimrunner
language: ruby rvm: -‐ 1.9.3 before_install: sudo apt-‐get install
vim-‐gtk before_script: -‐ "export DISPLAY=:99.0" -‐ "sh -‐e /etc/init.d/xvfb start" TRAVIS CI
None
VIM-UNITTEST? VIM-QUICKCHECK? VIM-Your-Test-Library-of-Choice?
Thank you @mudge http://mudge.name