Skip to content

Commit

Permalink
label: add error case in test for from_ascii.
Browse files Browse the repository at this point in the history
  • Loading branch information
darnuria authored and djc committed Oct 14, 2022
1 parent 8ee4cb7 commit d4d065e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/proto/src/rr/domain/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ mod tests {
);
}

#[test]
fn test_from_ascii_adversial_utf8() {
let expect_err = Label::from_ascii("🦀");
assert!(expect_err.is_err());
}

#[test]
fn test_to_lowercase() {
assert_ne!(Label::from_ascii("ABC").unwrap().to_string(), "abc");
Expand Down

0 comments on commit d4d065e

Please sign in to comment.