mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-11-16 15:27:46 +00:00
regex: add more tests
This commit is contained in:
parent
77d0a7e422
commit
b2ce128daa
1 changed files with 6 additions and 0 deletions
|
@ -127,10 +127,16 @@ mod test {
|
|||
assert!(Regex::is_match(&r.address, "44hintoFpuo3ugKfcqJvh5BmrsTRpnTasJmetKC4VXCt6QDtbHVuixdTtsm6Ptp7Y8haXnJ6j8Gj2dra8CKy5ewz7Vi9CYW"));
|
||||
assert!(Regex::is_match(&r.ipv4, "192.168.1.2"));
|
||||
assert!(Regex::is_match(&r.ipv4, "127.0.0.1"));
|
||||
assert!(Regex::is_match(&r.domain, "sub.domain.com"));
|
||||
assert!(Regex::is_match(&r.domain, "sub.domain.longtld"));
|
||||
assert!(Regex::is_match(&r.domain, "sub.sub.domain.longtld"));
|
||||
assert!(Regex::is_match(&r.domain, "my.node.com"));
|
||||
assert!(Regex::is_match(&r.domain, "my.node.longtld"));
|
||||
assert!(Regex::is_match(&r.domain, "my.monero-node123.net"));
|
||||
assert!(Regex::is_match(&r.domain, "www.my-node.org"));
|
||||
assert!(Regex::is_match(&r.domain, "www.my-monero-node123.io"));
|
||||
assert!(Regex::is_match(&r.domain, "www.my-monero-node123.longtld"));
|
||||
assert!(Regex::is_match(&r.domain, "www.my-monero-node123.org"));
|
||||
for i in 1..=65535 {
|
||||
assert!(Regex::is_match(&r.port, &i.to_string()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue