branch: elpa/swift-mode
commit 5adb37d760a41fbdf6ff20da85c445d7229159fb
Author: Chris Barrett <chris.d.barr...@me.com>
Commit: Chris Barrett <chris.d.barr...@me.com>

    More indentation tests
---
 test/indentation-tests.el | 85 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 19b2e59..4f07885 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -223,6 +223,91 @@ switch true {
 ")
 
 
+(check-indentation indents-case-statement-bodies/1
+"
+switch x {
+case y:
+|return z
+}
+" "
+switch x {
+case y:
+    |return z
+}
+")
+
+(check-indentation indents-case-statement-bodies/2
+"
+switch x {
+case y:
+       |return z
+}
+" "
+switch x {
+case y:
+    |return z
+}
+")
+
+(check-indentation indents-case-statement-bodies/3
+"
+switch x {
+case y:
+    |return z
+}
+" "
+switch x {
+case y:
+    |return z
+}
+")
+
+(check-indentation indents-case-statement-bodies/4
+"
+switch x {
+case y:
+    x
+    |return z
+}
+" "
+switch x {
+case y:
+    x
+    |return z
+}
+")
+
+(check-indentation indents-case-statement-bodies/5
+"
+switch x {
+case y:
+    x
+|return z
+}
+" "
+switch x {
+case y:
+    x
+    |return z
+}
+")
+
+(check-indentation indents-case-statement-bodies/6
+"
+switch x {
+case y:
+    x
+        |return z
+}
+" "
+switch x {
+case y:
+    x
+    |return z
+}
+")
+
+
 (check-indentation 
indents-default-statements-to-same-level-as-enclosing-switch/1
   "
 {

Reply via email to