mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
misc: Added working ssh_is_ipaddr for Windows.
This commit is contained in:
@@ -32,7 +32,15 @@ static void torture_ssh_is_ipaddr(void **state) {
|
||||
assert_int_equal(ssh_is_ipaddr("0a.0.0.0.0"),0);
|
||||
assert_int_equal(ssh_is_ipaddr(""),0);
|
||||
assert_int_equal(ssh_is_ipaddr("0.0.0."),0);
|
||||
#ifndef _WIN32
|
||||
/* These are valid ip address on Windows */
|
||||
assert_int_equal(ssh_is_ipaddr("0.0.0"),0);
|
||||
assert_int_equal(ssh_is_ipaddr("0.0"),0);
|
||||
assert_int_equal(ssh_is_ipaddr("0"),0);
|
||||
#endif
|
||||
|
||||
assert_int_equal(ssh_is_ipaddr("2001:0db8:85a3:0000:0000:8a2e:0370:7334:1002"), 0);
|
||||
assert_int_equal(ssh_is_ipaddr("fe80:x:202:b3ff:fe1e:8329"), 0);
|
||||
}
|
||||
|
||||
int torture_run_tests(void) {
|
||||
|
||||
Reference in New Issue
Block a user