net: prevent udp_test.v from running on windows without -d network

pull/8345/head
Delyan Angelov 2021-01-25 19:02:19 +02:00
parent 8520feee55
commit 3526bc3d19
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,13 @@
import net
fn testsuite_begin() {
$if windows {
$if !network ? {
exit(0)
}
}
}
fn echo_server(mut c net.UdpConn) {
for {
mut buf := []byte{len: 100, init: 0}
@ -56,7 +64,3 @@ fn test_udp() {
l.close() or { }
}
fn main() {
test_udp()
}