]> git.madduck.net Git - etc/vim.git/blobdiff - spec/indent/indent_spec.rb

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Unindent 'finally' after 'else' too
[etc/vim.git] / spec / indent / indent_spec.rb
index 77b94ef4c36ad8055cf24bfe0483ee78f3db1077..a622cf8ef29139c225b7515f7b69328a8d9114bc 100644 (file)
@@ -144,6 +144,15 @@ shared_examples_for "vim" do
      end
   end
 
+  describe "when an 'else' is followed by" do
+     before { vim.feedkeys 'i\<TAB>\<TAB>else:\<CR>XXX\<CR>' }
+     it "a 'finally', it lines up with the 'else'" do
+        vim.feedkeys 'finally:'
+        indent.should == shiftwidth * 2
+     end
+  end
+
+
   describe "when a 'try' is followed by" do
      before { vim.feedkeys 'i\<TAB>\<TAB>try:\<CR>' }
      it "an 'except', it lines up with the 'try'" do