fix test name, add test for list spread
@@ -3895,7 +3895,7 @@ fn multiple_line_custom_type_constructor_field_doc_comments() {
// https://github.com/gleam-lang/gleam/issues/1872
#[test]
-fn multiple_line_custom_type_field_doc_comments() {
+fn multiple_line_custom_type_field_comments() {
assert_format!(
r#"fn main() {
Thingy(
@@ -3914,6 +3914,24 @@ fn multiple_line_custom_type_field_doc_comments() {
);
}
+// https://github.com/gleam-lang/gleam/issues/1872
+#[test]
+fn multiple_line_spread_list_comments() {
+ assert_format!(
+ r#"fn main() {
+ [
+ // First!
+ // First?
+ 1,
+ // Spread!
+ // Spread?
+ ..[2, 3]
+ ]
+}
+"#
+ );
+}
+
// https://github.com/gleam-lang/gleam/issues/1786
#[test]
fn multiple_line_documentation_comment_statement_grouping() {
