about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/source/indent_match_arms.rs27
-rw-r--r--tests/target/indent_match_arms.rs29
2 files changed, 56 insertions, 0 deletions
diff --git a/tests/source/indent_match_arms.rs b/tests/source/indent_match_arms.rs
new file mode 100644
index 00000000000..ecadbe705ff
--- /dev/null
+++ b/tests/source/indent_match_arms.rs
@@ -0,0 +1,27 @@
+// rustfmt-indent_match_arms: false
+
+fn main() {
+    match x {
+        1 => "one",
+        2 => "two",
+        3 => "three",
+        4 => "four",
+        5 => "five",
+        _ => "something else",
+    }
+
+    match x {
+        1 => "one",
+        2 => "two",
+        3 => "three",
+        4 => "four",
+        5 => match y {
+            'a' => 'A',
+            'b' => 'B',
+            'c' => 'C',
+            _ => "Nope",
+        },
+        _ => "something else",
+    }
+
+}
diff --git a/tests/target/indent_match_arms.rs b/tests/target/indent_match_arms.rs
new file mode 100644
index 00000000000..60e7b67ceb4
--- /dev/null
+++ b/tests/target/indent_match_arms.rs
@@ -0,0 +1,29 @@
+// rustfmt-indent_match_arms: false
+
+fn main() {
+    match x {
+    1 => "one",
+    2 => "two",
+    3 => "three",
+    4 => "four",
+    5 => "five",
+    _ => "something else",
+    }
+
+    match x {
+    1 => "one",
+    2 => "two",
+    3 => "three",
+    4 => "four",
+    5 => {
+        match y {
+        'a' => 'A',
+        'b' => 'B',
+        'c' => 'C',
+        _ => "Nope",
+        }
+    }
+    _ => "something else",
+    }
+
+}