diff --git a/test/parser_test.rb b/test/parser_test.rb
index <HASH>..<HASH> 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -85,6 +85,15 @@ module Haml
       end
     end
 
+    test "case with indented whens should allow else" do
+      begin
+        parse "- foo = 1\n-case foo\n  -when 1\n    A\n  -else\n    B"
+        assert true
+      rescue SyntaxError
+        flunk 'case with indented whens should allow else'
+      end
+    end
+
     private
 
     def parse(haml, options = nil)
Add test for case with indented when clauses

Case statements where the subsequent when clauses are indented and
which have a trailing else cause a Haml::SyntaxError.

Add test to expose this.