Test let fn/case formatting
@@ -1006,6 +1006,36 @@ World"
"#
);
+ assert_format!(
+ r#"fn main() {
+ let y = case x {
+ 1 -> 1
+ _ -> 0
+ }
+ y
+}
+"#
+ );
+
+ assert_format!(
+ r#"fn main() {
+ let x = fn(x) { x }
+ x
+}
+"#
+ );
+
+ assert_format!(
+ r#"fn main() {
+ let x = fn() {
+ 1
+ 2
+ }
+ x
+}
+"#
+ );
+
//
// Pattern::Float
//
