mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-30 05:24:50 +03:00
tests: Workaround for a Wine bug
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
deb7630c67
commit
1b8ce5a6ed
@ -10,7 +10,10 @@
|
|||||||
/*
|
/*
|
||||||
* Test the behavior of ssh_is_ipaddr()
|
* Test the behavior of ssh_is_ipaddr()
|
||||||
*/
|
*/
|
||||||
static void torture_ssh_is_ipaddr(void **state) {
|
static void torture_ssh_is_ipaddr(void **state)
|
||||||
|
{
|
||||||
|
char *env = NULL;
|
||||||
|
|
||||||
(void)state;
|
(void)state;
|
||||||
|
|
||||||
assert_int_equal(ssh_is_ipaddr("127.0.0.1"),1);
|
assert_int_equal(ssh_is_ipaddr("127.0.0.1"),1);
|
||||||
@ -37,7 +40,14 @@ static void torture_ssh_is_ipaddr(void **state) {
|
|||||||
assert_int_equal(ssh_is_ipaddr("0.0.0."),0);
|
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"),0);
|
||||||
assert_int_equal(ssh_is_ipaddr("0"),0);
|
assert_int_equal(ssh_is_ipaddr("0"),0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: Temporary workaround for Wine bug
|
||||||
|
*/
|
||||||
|
env = getenv("WINEPATH");
|
||||||
|
if (env == NULL) {
|
||||||
assert_int_equal(ssh_is_ipaddr("255.255.255"),0);
|
assert_int_equal(ssh_is_ipaddr("255.255.255"),0);
|
||||||
|
}
|
||||||
|
|
||||||
assert_int_equal(ssh_is_ipaddr("2001:0db8:85a3:0000:0000:8a2e:0370:7334:1002"), 0);
|
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);
|
assert_int_equal(ssh_is_ipaddr("fe80:x:202:b3ff:fe1e:8329"), 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user