Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Aug 11, 2023
1 parent 5bd9625 commit d87d4e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions crates/taplo/src/tests/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,3 +1108,26 @@ my_array = [

assert_format!(expected, &formatted);
}

#[test]
fn test_comment_with_brackets() {
let src = r#"
my_array = [
# [x]
"y",
]
"#;

let expected = r#"
my_array = [
# [x]
"y",
]
"#;

let formatted = crate::formatter::format(
src, Default::default()
);

assert_format!(expected, &formatted);
}

0 comments on commit d87d4e7

Please sign in to comment.