Skip to content

Commit b5ed407

Browse files
committed
add test case IP
1 parent eca9043 commit b5ed407

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_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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy