Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for options (g:detectindent_*) #12

Open
roryokane opened this issue Mar 1, 2015 · 0 comments
Open

Add unit tests for options (g:detectindent_*) #12

roryokane opened this issue Mar 1, 2015 · 0 comments

Comments

@roryokane
Copy link
Owner

These tests could go in a file like tests/config-options-are-respected.vader. Here is a start at writing it:

Execute (reset indent options to initial values):
  " so it is clear what values later tests are working with
  setglobal noexpandtab tabstop=8 softtabstop=0 shiftwidth=8

Execute (TODO g:detectindent_preferred_indent is respected):
  let g:detectindent_preferred_indent = 4
  " TODO open a file, DetectIndent, and check that the settings are different
  " from what they would be if that option wasn’t set
  unlet g:detectindent_preferred_indent

# TODO test the other options too

Unit tests for options would confirm that options currently behave desirably in all situations, and ensure that they keep functioning properly when the code is changed.

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

No branches or pull requests

1 participant