Created
June 25, 2013 16:03
-
-
Save nelstrom/5859732 to your computer and use it in GitHub Desktop.
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
" http://learnvimscriptthehardway.stevelosh.com/chapters/22.html | |
" | |
describe '==' | |
it 'compares strings respecting user-defined &ignorecase setting' | |
set noignorecase | |
Expect 'abc' == 'abc' | |
Expect 'abc' not == 'ABC' | |
set ignorecase | |
Expect 'abc' == 'abc' | |
Expect 'abc' == 'ABC' | |
end | |
end | |
describe '==#' | |
it 'compares strings case-sensitively' | |
set ignorecase | |
Expect 'abc' ==# 'abc' | |
Expect 'abc' not ==# 'ABC' | |
set noignorecase | |
Expect 'abc' ==# 'abc' | |
Expect 'abc' not ==# 'ABC' | |
end | |
end | |
describe '==?' | |
it 'compares strings ignoring case' | |
set ignorecase | |
Expect 'abc' ==? 'abc' | |
Expect 'abc' ==? 'ABC' | |
set noignorecase | |
Expect 'abc' ==? 'abc' | |
Expect 'abc' ==? 'ABC' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check out episode 50 of Vimcasts for an introduction to vspec