Skip to content

Commit 0679358

Browse files
os.net: enable tests related to if_nametoindex for windows
1 parent 9a5ba5e commit 0679358

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/std/net/test.zig

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ test "parse and render IPv6 addresses" {
7474
try testing.expectError(error.InvalidIpv4Mapping, net.Address.parseIp6("::123.123.123.123", 0));
7575
try testing.expectError(error.Incomplete, net.Address.parseIp6("1", 0));
7676
// TODO Make this test pass on other operating systems.
77-
if (builtin.os.tag == .linux or comptime builtin.os.tag.isDarwin()) {
77+
if (builtin.os.tag == .linux or comptime builtin.os.tag.isDarwin() or builtin.os.tag == .windows) {
7878
try testing.expectError(error.Incomplete, net.Address.resolveIp6("ff01::fb%", 0));
7979
try testing.expectError(error.Overflow, net.Address.resolveIp6("ff01::fb%wlp3s0s0s0s0s0s0s0s0", 0));
8080
try testing.expectError(error.Overflow, net.Address.resolveIp6("ff01::fb%12345678901234", 0));
8181
}
8282
}
8383

8484
test "invalid but parseable IPv6 scope ids" {
85-
if (builtin.os.tag != .linux and comptime !builtin.os.tag.isDarwin()) {
85+
if (builtin.os.tag != .linux and comptime !builtin.os.tag.isDarwin() and builtin.os.tag != .windows) {
8686
// Currently, resolveIp6 with alphanumerical scope IDs only works on Linux.
8787
// TODO Make this test pass on other operating systems.
8888
return error.SkipZigTest;
@@ -206,7 +206,7 @@ test "listen on a port, send bytes, receive bytes" {
206206
}
207207

208208
test "listen on an in use port" {
209-
if (builtin.os.tag != .linux and comptime !builtin.os.tag.isDarwin()) {
209+
if (builtin.os.tag != .linux and comptime !builtin.os.tag.isDarwin() and builtin.os.tag != .windows) {
210210
// TODO build abstractions for other operating systems
211211
return error.SkipZigTest;
212212
}

0 commit comments

Comments
 (0)