diff --git a/tests/testbugs.nim b/tests/testbugs.nim index c6122e69..dedd0a48 100644 --- a/tests/testbugs.nim +++ b/tests/testbugs.nim @@ -20,7 +20,12 @@ type proc udp4DataAvailable(transp: DatagramTransport, remote: TransportAddress): Future[void] {.async, gcsafe.} = var udata = getUserData[CustomData](transp) - if udata.test == "CHECK": + var expect = TEST_MSG + var data: seq[byte] + var datalen: int + transp.peekMessage(data, datalen) + if udata.test == "CHECK" and datalen == MSG_LEN and + equalMem(addr data[0], addr expect[0], datalen): udata.test = "OK" transp.close()