X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/445ce093b0aaaf767b18c052edbe688e82d18480..b343736b69ae21d90d92a1c4e8e8c7e16035ae58:/spec/indent/indent_spec.rb?ds=sidebyside diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 1eea365..15e265a 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -216,6 +216,14 @@ shared_examples_for "vim" do end end + describe "when current line is dedented compared to the last non-empty line" do + before { vim.feedkeys 'i\\if x:\y = True\\\' } + it "and current line has a valid indentation" do + vim.feedkeys '0i\if y:' + proposed_indent.should == -1 + end + end + describe "when an 'if' is followed by" do before { vim.feedkeys 'i\\if x:\' } it "an elif, it lines up with the 'if'" do