Skip to content

Instantly share code, notes, and snippets.

@nelstrom
Created June 25, 2013 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelstrom/5859732 to your computer and use it in GitHub Desktop.
Save nelstrom/5859732 to your computer and use it in GitHub Desktop.
" 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
@nelstrom
Copy link
Author

Check out episode 50 of Vimcasts for an introduction to vspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment