Skip to content

Commit

Permalink
Merge pull request #514 from CXWorks/master
Browse files Browse the repository at this point in the history
Add unit test for uncovered regions
  • Loading branch information
mgeisler committed Jun 22, 2023
2 parents 872f221 + 6ca0fc3 commit 4b2d9be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/refill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ mod tests {
assert_eq!(options.line_ending, LineEnding::LF);
}

#[test]
fn test_unfill_consecutive_different_prefix() {
let (text, options) = unfill("foo\n*\n/");
assert_eq!(text, "foo * /");
assert_eq!(options.width, 3);
assert_eq!(options.line_ending, LineEnding::LF);
}

#[test]
fn unfill_trailing_newlines() {
let (text, options) = unfill("foo\nbar\n\n\n");
Expand Down

0 comments on commit 4b2d9be

Please sign in to comment.