Skip to content

Commit

Permalink
Add some single-line format patch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Jan 4, 2022
1 parent 51419ab commit 8a355f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,12 @@ mod tests {
"#"##]]
.assert_eq(&patch);

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

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

let patch = format_patch(Some(0), "hello\nworld\n");
expect![[r##"
r#"
Expand Down

0 comments on commit 8a355f4

Please sign in to comment.