X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/80f44e73fdb2b71d7ef4825b609a682508b2145c..62189f57e66400fcd1135bfaf6ca2eeb2d233e15:/spec/indent/indent_spec.rb diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 68b545f..4227b3f 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -700,3 +700,30 @@ describe "Compact multiline dict" do proposed_indent.should == 0 end end + +describe "Using O" do + before { vim.feedkeys 'iif foo:\' } + + it "respects autoindent" do + vim.feedkeys '1\\' + indent.should == shiftwidth + vim.feedkeys '\ko' + indent.should == shiftwidth + vim.feedkeys '\kO' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\i2\O' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\j\O' + 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