X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/10228215c76da4004b5ac4b60cfdf94682ea6e22..7dfebca4ed468be64afffd8107e7a87f35d8ef5b:/spec/indent/indent_spec.rb diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index ecdbcad..342b301 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -361,6 +361,14 @@ shared_examples_for "vim" do end end + describe "when an else is used inside of a nested if" do + before { vim.feedkeys 'iif foo:\\if bar:\\\pass\' } + it "indents an else to the inner if" do + vim.feedkeys 'else:' + indent.should == shiftwidth * 2 + end + end + describe "when jedi-vim call signatures are used" do before { vim.command 'syn match jediFunction "JEDI_CALL_SIGNATURE" keepend extend' } @@ -448,6 +456,16 @@ shared_examples_for "multiline strings" do proposed_indent.should == 4 end end + + describe "when breaking a string after opening parenthesis" do + before { vim.feedkeys 'i foo("""bar' } + it "it does indent the next line as after an opening multistring" do + vim.feedkeys '\' + expected_proposed, expected_indent = multiline_indent(4, 4 + shiftwidth) + indent.should == expected_indent + proposed_indent.should == expected_proposed + end + end end describe "vim when using width of 4" do