Skip to content

Commit

Permalink
add missing test with empty delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Dec 9, 2024
1 parent 60f2652 commit 0943683
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/types/persons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ mod tests {
p.initials(&mut s, Some("."), true).unwrap();
assert_eq!("H.-J.", s);

let mut s = String::new();
let p = Person::from_strings(vec!["Günther", "Hans-Joseph"]).unwrap();
p.initials(&mut s, Some(""), true).unwrap();
assert_eq!("H-J", s);

let mut s = String::new();
let p = Person::from_strings(vec!["Günther", "Hans-Joseph"]).unwrap();
p.initials(&mut s, None, true).unwrap();
Expand Down

0 comments on commit 0943683

Please sign in to comment.