emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode 5adb37d 070/496: More indentation tests


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 5adb37d 070/496: More indentation tests
Date: Sun, 29 Aug 2021 11:33:10 -0400 (EDT)

branch: elpa/swift-mode
commit 5adb37d760a41fbdf6ff20da85c445d7229159fb
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@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

[Prev in Thread] Current Thread [Next in Thread]