X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c2e53f8cab69594b3fffbbdcbbe38acafdb7ca19..68c34f9b2944a9ebf1f970d2d54b915806a121ad:/spec/indent/indent_spec.rb?ds=sidebyside diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 4227b3f..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\\' @@ -727,3 +730,17 @@ describe "searchpairpos" do 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