Skip to content

Commit

Permalink
Update format_patch tests to include the inner braces
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Jan 4, 2022
1 parent 738fd9a commit ce5e69d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,24 +726,24 @@ mod tests {
fn test_format_patch() {
let patch = format_patch(None, "hello\nworld\n");
expect![[r##"
r#"
[r#"
hello
world
"#"##]]
"#]"##]]
.assert_eq(&patch);

let patch = format_patch(None, r"hello\tworld");
expect![[r##"r#"hello\tworld"#"##]].assert_eq(&patch);
expect![[r##"[r#"hello\tworld"#]"##]].assert_eq(&patch);

let patch = format_patch(None, "{\"foo\": 42}");
expect![[r##"r#"{"foo": 42}"#"##]].assert_eq(&patch);
expect![[r##"[r#"{"foo": 42}"#]"##]].assert_eq(&patch);

let patch = format_patch(Some(0), "hello\nworld\n");
expect![[r##"
r#"
[r#"
hello
world
"#"##]]
"#]"##]]
.assert_eq(&patch);

let patch = format_patch(Some(4), "single line");
Expand Down

0 comments on commit ce5e69d

Please sign in to comment.