X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/61e1c4d6a5c90ba0222cd58198ccc0232433f90c..68c34f9b2944a9ebf1f970d2d54b915806a121ad:/spec/indent/indent_spec.rb?ds=sidebyside diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 9c52235..db66b8f 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -702,7 +702,10 @@ describe "Compact multiline dict" do end describe "Using O" do - before { vim.feedkeys 'iif foo:\' } + before { + vim.feedkeys '\ggdG' + vim.feedkeys 'iif foo:\' + } it "respects autoindent" do vim.feedkeys '1\\' @@ -719,3 +722,25 @@ describe "Using O" do indent.should == 0 end end + +describe "searchpairpos" do + before { vim.feedkeys '\ggdG' } + it "handles nested parenthesis" do + vim.feedkeys 'iif foo.startswith("("):\' + indent.should == shiftwidth + end +end + +describe "o within TODO" do + before { + vim.feedkeys '\ggdG' + vim.feedkeys 'iif 1: # TODO\' + # Assertion that we have a pythonTodo here. + vim.echo('synIDattr(synID(line("."), col("."), 0), "name")').should match 'pythonTodo' + } + + it "respects autoindent" do + vim.feedkeys 'o' + indent.should == shiftwidth + end +end