mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
* fix #16256: nimout: <empty> should give error (vacuously true); improve some tests * renamed: tests/stdlib/t9710.nim -> tests/misc/t9710.nim * improve tests * fix non-DRY tests * improve $nim_prs_D/tests/stdlib/t9091.nim * renamed: tests/stdlib/t9091.nim -> tests/misc/t9091.nim * fixup * address comment: doAssert => result.parseErrors
19 lines
517 B
Nim
19 lines
517 B
Nim
import nativesockets
|
|
|
|
when not defined(netbsd):
|
|
# Ref: https://github.com/nim-lang/Nim/issues/15452 - NetBSD doesn't define an `ip` protocol
|
|
doAssert getProtoByName("ip") == 0
|
|
|
|
doAssert getProtoByName("ipv6") == 41
|
|
doAssert getProtoByName("tcp") == 6
|
|
doAssert getProtoByName("udp") == 17
|
|
doAssert getProtoByName("icmp") == 1
|
|
doAssert getProtoByName("ipv6-icmp") == 58
|
|
|
|
when defined(windows):
|
|
doAssertRaises(OSError):
|
|
discard getProtoByName("raw")
|
|
|
|
doAssertRaises(OSError):
|
|
discard getProtoByName("Error")
|