@@ -206,12 +206,19 @@ test_error(req$opt("false", list()), "type")
206206
207207test_class(" nanoContext" , ctx <- context(rep ))
208208test_print(ctx )
209+ test_equal(.header(12345L ), 12345L )
209210test_true(.mark())
210211test_class(" sendAio" , csaio <- req $ send_aio(data.frame (), mode = " seria" , timeout = 500 ))
211- test_true(! .mark(FALSE ))
212212test_zero(call_aio_(csaio )$ result )
213- test_class(" recvAio" , craio <- recv_aio(ctx , timeout = 500 ))
214- test_type(" list" , collect_aio(craio ))
213+ test_class(" recvAio" , craio <- recv_aio(ctx , mode = 8L , timeout = 500 ))
214+ test_type(" raw" , res <- collect_aio(craio ))
215+ test_true(.read_marker(res ))
216+ test_true(! .read_marker(" not" ))
217+ test_equal(.read_header(res ), 12345L )
218+ test_equal(.read_header(" not" ), 0L )
219+ test_type(" list" , unserialize(res [9 : length(res )]))
220+ test_equal(.header(0L ), 0L )
221+ test_true(! .mark(FALSE ))
215222test_zero(req $ send(" context test" , mode = " raw" , block = 500 ))
216223test_equal(recv(ctx , mode = " string" , block = 500 ), " context test" )
217224test_type(" integer" , req $ send(data.frame (), mode = " seri" , block = 500 ))
@@ -220,6 +227,7 @@ test_type("logical", .unresolved(msg))
220227test_type(" logical" , unresolved(msg ))
221228test_class(" data.frame" , call_aio(msg )$ data )
222229test_true(! unresolved(msg ))
230+ test_equal(.header(2025250L ), 2025250L )
223231test_zero(req $ send(c(TRUE , FALSE , TRUE ), mode = 2L , block = 500 ))
224232test_class(" recvAio" , msg <- recv_aio(ctx , mode = 6L , timeout = 500 ))
225233test_type(" logical" , msg [])
@@ -245,6 +253,7 @@ test_class("recvAio", rek <- request(req$context, c(1+3i, 4+2i), send_mode = "se
245253test_zero(reply(ctx , execute = identity , recv_mode = 1L , send_mode = 1L , timeout = 500 ))
246254test_type(" complex" , call_aio(rek )[[" data" ]])
247255test_type(" integer" , rek [[" aio" ]])
256+ test_equal(.header(0L ), 0L )
248257
249258test_type(" list" , cfg <- serial_config(class = c(" invalid" , " custom" ), sfunc = list (identity , function (x ) raw(1L )), ufunc = list (identity , as.integer )))
250259opt(req $ socket , " serial" ) <- cfg
0 commit comments