X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7665325e833a60a9217f7e62c37069ef6b359d18..8d64e05e37bc3c9a01bd7c5d6e2948470551c351:/spec/indent/indent_spec.rb?ds=inline diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 400ec11..aa796df 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -685,3 +685,22 @@ 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