X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2de20d9c659d6350a6408dc1ec4aa6e0b1dea6ac..3f68af9813542a5e277b7a51b316644241c372d7:/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb diff --git a/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb b/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb new file mode 100644 index 0000000..03dcbb2 --- /dev/null +++ b/.vim/bundle/vim-python-pep8-indent/spec/indent/cython_spec.rb @@ -0,0 +1,36 @@ +require "spec_helper" + +describe "vim for cython" do + before(:all) { + vim.command "new" + vim.command "set ft=cython" + vim.command("set indentexpr?").should include "GetPythonPEPIndent(" + } + before(:each) { + # clear buffer + vim.normal 'gg"_dG' + + # Insert two blank lines. + # The first line is a corner case in this plugin that would shadow the + # correct behaviour of other tests. Thus we explicitly jump to the first + # line when we require so. + vim.feedkeys 'i\\\' + } + after(:all) { + vim.command "bwipe!" + } + + describe "when using a cdef function definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'icdef long_function_name(\arg' + indent.should == shiftwidth + end + end + + describe "when using a cpdef function definition" do + it "indents shiftwidth spaces" do + vim.feedkeys 'icpdef long_function_name(\arg' + indent.should == shiftwidth + end + end +end