X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/502aea33111e33371315b4b5e93f4ba3452dbf80..b0bb7f66733400fe8ac914fab8860aec8d38b915:/spec/indent/indent_spec.rb diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index bd0d0d9..eb3c8a6 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -67,6 +67,20 @@ shared_examples_for "vim" do end end + describe "when '#' is contained in a string that is followed by a colon" do + it "indents by one level" do + vim.feedkeys 'iif "some#thing" == "test":#test\pass' + indent.should == shiftwidth + end + end + + describe "when '#' is not contained in a string and is followed by a colon" do + it "does not indent" do + vim.feedkeys 'iif "some#thing" == "test"#:test\' + indent.should == 0 + end + end + describe "when using simple control structures" do it "indents shiftwidth spaces" do vim.feedkeys 'iwhile True:\pass'