10000 add test case IP · unicode-rs/unicode-segmentation@9a85968 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a85968

Browse files
committed
add test case IP
1 parent eca9043 commit 9a85968

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/word.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ mod tests {
799799

800800
#[test]
801801
fn test_ascii_word_indices_ 87DC various_cases() {
802-
let s = "Hello, world! can't e.g. var1 123,456 foo_bar example.com";
802+
let s = "Hello, world! can't e.g. var1 123,456 foo_bar example.com 127.0.0.1:9090";
803803
let words: Vec<&str> = new_unicode_words_ascii(s).collect();
804804
let expected = vec![
805805
("Hello"), // simple letters
@@ -810,6 +810,8 @@ mod tests {
810810
("123,456"), // digits+comma+digits
811811
("foo_bar"),
812812
("example.com"),
813+
("127.0.0.1"),
814+
("9090"), // port number
813815
];
814816
assert_eq!(words, expected);
815817
}

0 commit comments

Comments
 (0)
0