Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testing Vimscript with Vimrunner
Search
Paul Mucur
February 26, 2013
Programming
3
190
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
120
HyperLogLog in 15 minutes
mudge
0
180
Exploring #to_proc
mudge
0
160
Configuration Management with Puppet
mudge
1
220
Extending Ruby with C
mudge
1
280
Managing Web Application Servers with Puppet
mudge
3
140
Other Decks in Programming
See All in Programming
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
25
7.7k
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
160
今、知っておきたい! 生成AIエージェントの世界
elith
3
340
Build with AI 2024 Seoul - 제로부터 시작하는 Flutter with Gemini 생활 - 박제창
itsmedreamwalker
0
200
What We Can Learn From OSS
inouehi
0
400
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
870
チーム力を高めるスクラム実践法:カンバン公開と課題攻略について - ニフティのスクラムトーク Vol. 2 - NIFTY Tech Talk #18
niftycorp
PRO
1
110
PostmanでAPIの動作確認が楽になった話
h455h1
0
110
SpringBoot+MyBatisで例外が出たときどこを見るか
syukai
0
110
ゆるい個人開発のススメ
kuroppe1819
10
930
Designing for tomorrow's programming workflows
honnibal
PRO
2
110
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.6k
Featured
See All Featured
Teambox: Starting and Learning
jrom
128
8.4k
Into the Great Unknown - MozCon
thekraken
10
980
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Web Components: a chance to create the future
zenorocha
304
41k
Writing Fast Ruby
sferik
619
60k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
15
1.4k
The Mythical Team-Month
searls
214
42k
In The Pink: A Labor of Love
frogandcode
137
21k
Git: the NoSQL Database
bkeepers
PRO
421
63k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
115
18k
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
[email protected]
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
[email protected]
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