@@ -78,15 +78,16 @@ raio <- n1$recv_aio(timeout = 500, keep.raw = TRUE)
7878raio
7979raio $ newfield <- " doesnotwork"
8080nanotestn(raio $ newfield )
81- nanotestnn(raio [[" aio" ]])
82- nanotest(is_aio(call_aio(raio )))
83- nanotestn(raio [[" aio" ]])
84- nanotest(identical(unserialize(raio $ raw ), raio $ data ))
81+ nanotest(is_aio(raio ))
8582saio <- n $ send_aio(c(1.1 , 2.2 ), mode = " raw" , timeout = 500 )
8683saio $ newfield <- " doesnotwork"
8784nanotestn(saio $ newfield )
8885nanotest(is_aio(saio ))
8986nanotest(is.logical(unresolved(saio )))
87+ nanotestnn(raio $ raw )
88+ nanotest(identical(unserialize(call_aio(raio )$ raw ), raio $ data ))
89+ nanotestn(raio [[" aio" ]])
90+
9091msg <- n1 $ recv_aio(mode = " numer" , keep.raw = TRUE , timeout = 500 )
9192nanotestn(stop_aio(msg ))
9293nanotestn(stop_aio(n ))
@@ -236,16 +237,18 @@ nanotestnn(ncurl("http://www.cam.ac.uk/"))
236237nanotestnn(ncurl(" http://www.cam.ac.uk/" , follow = TRUE ))
237238nanotestnn(ncurl(" http://httpbin.org/post" , convert = FALSE , method = " POST" , headers = c(`Content-Type` = " text/plain" ), data = " test" , response = " server" ))
238239nanotestnn(ncurl(" http://httpbin.org/post" , convert = FALSE , method = " POST" , headers = list (`Content-Type` = " text/plain" ), response = list (" Date" , " Server" )))
239- nanotest(is_error_value(ncurl(" http" )$ raw ))
240+ relo <- ncurl(" http://www.cam.ac.uk/" , async = TRUE )
241+ nanotest(is.integer(call_aio(relo )$ status ))
240242put1 <- ncurl(" http://httpbin.org/put" , async = TRUE , method = " PUT" , headers = c(Authorization = " Bearer token" ), data = " test" , response = c(" date" , " server" ))
241243nanotest(is.integer(call_aio(put1 )$ status ))
242244nanotestnn(put1 $ headers )
243245nanotestnn(put1 $ raw )
244246nanotestnn(put1 $ data )
245247put2 <- ncurl(" http://httpbin.org/put" , async = TRUE , method = " PUT" , headers = list (Authorization = " Bearer token" ), response = list (" date" , " server" ))
246248put2
247- nanotestnn( put2 $ status )
249+ nanotest(is.list(call_aio( put2 ) $ headers ) )
248250nanotest(is.null(stop_aio(put2 )))
251+ nanotest(is_error_value(ncurl(" http" )$ raw ))
249252nanotest(is_error_value(ncurl(" http" , async = TRUE )$ data ))
250253haio <- ncurl(" https://i.i" , async = TRUE )
251254nanotest(is_error_value(call_aio(haio )$ raw ))
0 commit comments