Skip to content

Commit a07113c

Browse files
committed
test getHostByName error path
1 parent 437e043 commit a07113c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/stdlib/tnativesockets.nim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ block:
1010
let hostname = getHostname()
1111
doAssert hostname.len > 0
1212

13+
block:
14+
doAssertRaises(OSError):
15+
discard getHostByName("nonexistent.invalid")
16+
1317
when defined(windows):
1418
assertAll:
1519
toInt(IPPROTO_IP) == 0

0 commit comments

Comments
 (0)