Lines Matching refs:g

23   if g:testfunc =~ '_ipv6()$' 
31 call ch_log(g:testfunc)
34 let g:test_is_flaky = 1
57 let g:Ch_responseMsg = ''
59 let g:Ch_responseHandle = a:handle
60 let g:Ch_responseMsg = a:msg
94 call WaitFor('exists("g:split")')
95 call assert_equal(123, g:split)
139 call WaitFor('exists("g:Ch_responseHandle")')
140 if !exists('g:Ch_responseHandle')
141 call assert_report('g:Ch_responseHandle was not set')
143 call assert_equal(handle, g:Ch_responseHandle)
144 unlet g:Ch_responseHandle
146 call assert_equal('got it', g:Ch_responseMsg)
148 let g:Ch_responseMsg = ''
150 call WaitFor('exists("g:Ch_responseHandle")')
151 if !exists('g:Ch_responseHandle')
152 call assert_report('g:Ch_responseHandle was not set')
154 call assert_equal(handle, g:Ch_responseHandle)
155 unlet g:Ch_responseHandle
157 call assert_equal('got it', g:Ch_responseMsg)
160 let g:Ch_responseMsg = ''
162 call WaitFor('exists("g:Ch_responseHandle")')
163 if !exists('g:Ch_responseHandle')
164 call assert_report('g:Ch_responseHandle was not set')
166 call assert_equal(handle, g:Ch_responseHandle)
167 unlet g:Ch_responseHandle
169 call assert_equal('got it', g:Ch_responseMsg)
321 unlet g:Ch_reply
322 let g:Ch_reply = a:msg
334 call WaitForAssert({-> assert_equal('we called you', g:Ch_reply)})
338 call WaitForAssert({-> assert_equal('we did call you', g:Ch_reply)})
342 let g:Ch_reply = ""
345 let g:Ch_reply = ""
357 let g:Ch_reply = ''
359 unlet g:Ch_reply
360 let g:Ch_reply = a:msg
363 let g:Ch_zero_reply = ''
365 unlet g:Ch_zero_reply
366 let g:Ch_zero_reply = a:msg
380 let g:Ch_reply = ''
383 call WaitForAssert({-> assert_equal('zero index', g:Ch_reply)})
386 call assert_equal('', g:Ch_reply)
390 let g:Ch_reply = ''
391 let g:Ch_zero_reply = ''
393 call WaitForAssert({-> assert_equal('sent zero', g:Ch_zero_reply)})
395 call assert_equal('zero index', g:Ch_reply)
397 call assert_equal('', g:Ch_reply)
420 let g:Ch_reply1 = ""
422 unlet g:Ch_reply1
423 let g:Ch_reply1 = a:msg
426 let g:Ch_reply2 = ""
428 unlet g:Ch_reply2
429 let g:Ch_reply2 = a:msg
432 let g:Ch_reply3 = ""
434 unlet g:Ch_reply3
435 let g:Ch_reply3 = a:msg
448 call WaitForAssert({-> assert_equal("[1, \"got it\"]", g:Ch_reply1)})
451 call WaitForAssert({-> assert_equal("[2, \"something\"]", g:Ch_reply2)})
453 call WaitForAssert({-> assert_equal("[3, \"waited\"]", g:Ch_reply3)})
534 call assert_equal("something\n", substitute(msg, "\r", "", 'g'))
537 let g:handle = job->job_getchannel()
538 call WaitFor('g:handle->ch_canread()')
539 unlet g:handle
541 call assert_equal("this\nAND this\n", substitute(msg, "\r", "", 'g'))
543 let g:Ch_reply = ""
545 call WaitForAssert({-> assert_equal("this\nAND this\n", substitute(g:Ch_reply, "\r", "", 'g'))})
553 call assert_equal("Goodbye!\n", substitute(reply, "\r", "", 'g'))
558 let g:Ch_job = job
559 call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
618 call assert_equal("Goodbye!\n", substitute(reply, "\r", "", 'g'))
623 let g:Ch_job = job
624 call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
655 call job_stop(g:job)
659 call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
666 let g:job = job_start(s:python . " test_channel_pipe.py",
668 call assert_equal("run", job_status(g:job))
670 let handle = job_getchannel(g:job)
683 let g:job = job_start(s:python . " test_channel_pipe.py",
685 call assert_equal("run", job_status(g:job))
687 let handle = job_getchannel(g:job)
700 let g:job = job_start(s:python . " test_channel_pipe.py",
702 call assert_equal("run", job_status(g:job))
704 let handle = job_getchannel(g:job)
716 let g:job = job_start(s:python . " test_channel_pipe.py",
718 call assert_equal("run", job_status(g:job))
720 let handle = job_getchannel(g:job)
734 let g:Ch_bufClosed = 'yes'
738 let g:Ch_bufClosed = 'no'
767 call WaitFor('line("$") == ' . len(expected) . ' && g:Ch_bufClosed == "yes"')
774 call assert_equal('yes', g:Ch_bufClosed)
798 let g:test_is_flaky = 1
939 let g:test_is_flaky = 1
1211 let g:test_is_flaky = 1
1215 let g:Ch_outmsg = self.thisis . a:msg
1217 let g:Ch_outobj = a:msg
1221 let g:Ch_errmsg = self.thisis . a:msg
1231 let g:Ch_outmsg = ''
1232 let g:Ch_errmsg = ''
1235 call WaitForAssert({-> assert_equal("dict: hello", g:Ch_outmsg)})
1236 call WaitForAssert({-> assert_equal("dict: there", g:Ch_errmsg)})
1239 let g:Ch_outobj = ''
1247 call WaitForAssert({-> assert_equal({'one': 1, 'two': 2, 'three': 3}, g:Ch_outobj)}, timeout)
1255 let g:Ch_msg1 = ''
1256 let g:Ch_closemsg = 0
1259 let g:Ch_msg1 = a:msg
1264 let g:Ch_closemsg = s:counter
1273 call WaitForAssert({-> assert_equal('quit', g:Ch_msg1)})
1274 call WaitForAssert({-> assert_equal(2, g:Ch_closemsg)})
1283 let g:Ch_received = ''
1285 let g:Ch_received = ch_read(a:chan)
1292 call WaitForAssert({-> assert_equal('quit', g:Ch_received)})
1301 let g:Ch_received = ''
1304 let g:Ch_received .= ch_read(a:chan)
1312 call WaitForAssert({-> assert_equal('incomplete', g:Ch_received)})
1321 \ {'out_cb': {ch, msg -> execute("let g:Ch_outmsg = 'lambda: ' . msg")},
1323 \ 'err_cb': {ch, msg -> execute(":let g:Ch_errmsg = 'lambda: ' . msg")},
1327 let g:Ch_outmsg = ''
1328 let g:Ch_errmsg = ''
1331 call WaitForAssert({-> assert_equal("lambda: hello", g:Ch_outmsg)})
1332 call WaitForAssert({-> assert_equal("lambda: there", g:Ch_errmsg)})
1339 let g:test_is_flaky = 1
1340 let g:retdict = {'ret': {}}
1341 func g:retdict.close_cb(ch) dict
1344 func g:retdict.exit_cb(job, status) dict
1349 \ {'close_cb': g:retdict.close_cb,
1350 \ 'exit_cb': g:retdict.exit_cb})
1353 call WaitForAssert({-> assert_equal(2, len(g:retdict.ret))})
1354 call assert_match('^\%(dead\|run\)$', g:retdict.ret['close_cb'])
1355 call assert_equal('dead', g:retdict.ret['exit_cb'])
1356 unlet g:retdict
1362 exe g:wipe_buf 'bw!'
1372 let g:wipe_buf = bufnr('')
1377 call feedkeys(repeat('g', 1000) . 'o', 'ntx!')
1382 unlet g:wipe_buf
1388 let g:Ch_unletResponse = ''
1390 let g:Ch_unletResponse = a:msg
1398 call WaitForAssert({-> assert_equal('what?', g:Ch_unletResponse)})
1412 let g:Ch_unletResponse = ''
1414 let g:Ch_unletResponse = a:msg
1422 call WaitForAssert({-> assert_equal('what?', g:Ch_unletResponse)})
1499 let g:Ch_call_ret = [a:a, a:b, a:c]
1509 let g:Ch_call_ret = []
1511 call WaitForAssert({-> assert_equal([1, 2, 3], g:Ch_call_ret)})
1529 let g:Ch_job_exit_ret = 'not yet'
1531 let g:Ch_job_exit_ret = 'done'
1535 eval g:currentJob->job_setoptions({'exit_cb': 'MyExitCb'})
1536 let g:Ch_exit_job = g:currentJob
1537 call assert_equal('MyExitCb', job_info(g:currentJob)['exit_cb'])
1545 if g:Ch_job_exit_ret == 'done'
1550 call job_status(g:Ch_exit_job)
1553 call assert_equal('done', g:Ch_job_exit_ret)
1554 call assert_equal('dead', job_info(g:Ch_exit_job).status)
1555 unlet g:Ch_exit_job
1559 if job_info(a:job).process == g:exit_cb_val.process
1560 let g:exit_cb_val.end = reltime(g:exit_cb_val.start)
1567 let g:test_is_flaky = 1
1569 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
1571 let g:exit_cb_val.process = job_info(job).process
1572 call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0')
1573 let elapsed = reltimefloat(g:exit_cb_val.end)
1582 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
1583 …let g:job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'})
1584 let g:exit_cb_val.process = job_info(g:job).process
1585 unlet g:job
1587 if type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0
1588 let elapsed = reltimefloat(g:exit_cb_val.end)
1597 let g:Ch_close_ret = 'alive'
1599 let g:Ch_close_ret = 'closed'
1611 call WaitForAssert({-> assert_equal('closed', g:Ch_close_ret)})
1629 let g:Ch_d = {}
1630 func g:Ch_d.closeCb(ch) dict
1633 call ch_setoptions(handle, {'close_cb': g:Ch_d.closeCb})
1636 call WaitForAssert({-> assert_equal('closed', g:Ch_d.close_ret)})
1637 unlet g:Ch_d
1716 let g:job = job_start([s:python, '-c', 'import time;time.sleep(10)'])
1718 eval g:job->job_stop()
1719 call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
1721 call job_stop(g:job, 'kill')
1722 unlet g:job
1744 let g:a = job_start(['ls'])
1750 let g:test_is_flaky = 1
1754 let g:linecount = line('$')
1759 call WaitForAssert({-> assert_inrange(g:linecount, g:linecount + 1, line('$'))})
1819 …let g:Ch_job = job_start('cat', {'in_io': 'buffer', 'in_name': 'mybuffer', 'out_io': 'file', 'out_…
1820 call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
1833 let g:linecount = 0
1835 call job_start([s:python, '-c', arg], {'callback': {-> execute('let g:linecount += 1')}})
1836 call WaitForAssert({-> assert_equal(3, g:linecount)})
1837 unlet g:linecount
1843 let g:out .= ch_read(a:ch)
1847 let g:out = ''
1851 call WaitForAssert({-> assert_equal('123', g:out)})
1852 unlet g:out
1857 let g:linecount = 0
1859 call job_start([s:python, '-c', arg], {'callback': {-> execute('let g:linecount += 1')}})
1860 call WaitForAssert({-> assert_equal(1, g:linecount)})
1862 unlet g:linecount
1869 let g:echostr = ''
1871 let job = job_start(cmd, {'callback': {ch,msg -> execute(":let g:echostr .= msg")}})
1875 call WaitForAssert({-> assert_equal("123", g:echostr)})
1876 unlet g:echostr
1880 let g:envstr = ''
1887 …call job_start(cmd, {'callback': {ch,msg -> execute(":let g:envstr .= msg")}, 'env': {'FOO': 'bar'…
1888 call WaitForAssert({-> assert_equal("bar", g:envstr)})
1889 unlet g:envstr
1893 let g:test_is_flaky = 1
1894 let g:envstr = ''
1902 let job = job_start(cmd, {'callback': {ch,msg -> execute(":let g:envstr .= msg")}, 'cwd': expect})
1904 call WaitForAssert({-> assert_notequal("", g:envstr)})
1906 let g:envstr = substitute(g:envstr, '[/\\]$', '', '')
1907 if $CI != '' && stridx(g:envstr, '/private/') == 0
1908 let g:envstr = g:envstr[8:]
1910 call assert_equal(expect, g:envstr)
1913 unlet g:envstr
1923 let g:Ch_close_ret = ''
1924 call ch_setoptions(handle, {'close_cb': {ch -> execute("let g:Ch_close_ret = 'closed'")}})
1928 call WaitForAssert({-> assert_equal('closed', g:Ch_close_ret)})
1942 let g:out = ''
1943 …let job = job_start([s:python, '-c', a:cmd], {'callback': {ch, msg -> execute('let g:out .= msg')}…
1944 call WaitFor('"" != g:out')
1946 let g:out = substitute(g:out, '\r', '', 'g')
1949 let g:out = substitute(g:out, '\n$', '', 'g')
1951 call assert_equal(a:out, g:out)
1954 unlet g:out
2000 let g:val += 1
2004 let g:val += 1
2014 let g:job = job_start(cmd, {'out_cb': 'OutCb', 'exit_cb': 'ExitCb'})
2015 call substitute(repeat('a', 100000), '.', '', 'g')
2019 let g:val = 0
2026 call WaitForAssert({-> assert_equal(2, g:val)})
2027 call job_stop(g:job)
2032 unlet! g:val
2033 unlet! g:job
2038 let g:out = ''
2041 \ 'callback': {ch, msg -> execute('let g:out .= msg')}})
2046 call WaitFor({-> len(g:out) >= outlen}, 10000)
2048 call assert_equal(want, substitute(g:out, '\r', '', 'g'))
2051 unlet g:out
2209 let g:job = job_start(cmd, {})
2211 call job_stop(g:job)
2212 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2214 let g:job = job_start(cmd, {})
2216 call job_stop(g:job, 'term')
2217 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2219 let g:job = job_start(cmd, {})
2221 call job_stop(g:job, 'kill')
2222 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2227 let g:Ch_reply = ""
2229 let g:Ch_job = l:job
2230 call WaitForAssert({-> assert_equal("local local", trim(g:Ch_reply))})
2325 let g:wait_exit_cb = 0
2329 let g:wait_exit_cb = 1
2339 call WaitForAssert({-> assert_equal(0, g:wait_exit_cb)})
2341 unlet g:wait_exit_cb