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
240
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
140
HyperLogLog in 15 minutes
mudge
0
320
Exploring #to_proc
mudge
0
230
Configuration Management with Puppet
mudge
1
240
Extending Ruby with C
mudge
1
280
Managing Web Application Servers with Puppet
mudge
3
150
Other Decks in Programming
See All in Programming
TDD 実践ミニトーク
contour_gara
1
290
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
430
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
170
Rancher と Terraform
fufuhu
2
240
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
20
5.3k
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
130
print("Hello, World")
eddie
1
520
AI時代のUIはどこへ行く?
yusukebe
16
8.6k
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
370
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
450
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
21
11k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Visualization
eitanlees
148
16k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Optimizing for Happiness
mojombo
379
70k
Typedesign – Prime Four
hannesfritz
42
2.8k
Scaling GitHub
holman
463
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Become a Pro
speakerdeck
PRO
29
5.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
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