system_spec.lua 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. -- Tests for system() and :! shell.
  2. local t = require('test.testutil')
  3. local n = require('test.functional.testnvim')()
  4. local Screen = require('test.functional.ui.screen')
  5. local assert_alive = n.assert_alive
  6. local testprg = n.testprg
  7. local eq, call, clear, eval, feed_command, feed, api =
  8. t.eq, n.call, n.clear, n.eval, n.feed_command, n.feed, n.api
  9. local command = n.command
  10. local insert = n.insert
  11. local expect = n.expect
  12. local exc_exec = n.exc_exec
  13. local pcall_err = t.pcall_err
  14. local is_os = t.is_os
  15. local function create_file_with_nuls(name)
  16. return function()
  17. feed('ipart1<C-V>000part2<C-V>000part3<ESC>:w ' .. name .. '<CR>')
  18. eval('1') -- wait for the file to be created
  19. end
  20. end
  21. local function delete_file(name)
  22. return function()
  23. eval("delete('" .. name .. "')")
  24. end
  25. end
  26. describe('system()', function()
  27. before_each(clear)
  28. describe('command passed as a List', function()
  29. it('throws error if cmd[0] is not executable', function()
  30. eq(
  31. "Vim:E475: Invalid value for argument cmd: 'this-should-not-exist' is not executable",
  32. pcall_err(call, 'system', { 'this-should-not-exist' })
  33. )
  34. eq(-1, eval('v:shell_error'))
  35. end)
  36. it('parameter validation does NOT modify v:shell_error', function()
  37. -- 1. Call system() with invalid parameters.
  38. -- 2. Assert that v:shell_error was NOT set.
  39. feed_command('call system({})')
  40. eq('E475: Invalid argument: expected String or List', eval('v:errmsg'))
  41. eq(0, eval('v:shell_error'))
  42. feed_command('call system([])')
  43. eq('E474: Invalid argument', eval('v:errmsg'))
  44. eq(0, eval('v:shell_error'))
  45. -- Provoke a non-zero v:shell_error.
  46. eq(
  47. "Vim:E475: Invalid value for argument cmd: 'this-should-not-exist' is not executable",
  48. pcall_err(call, 'system', { 'this-should-not-exist' })
  49. )
  50. local old_val = eval('v:shell_error')
  51. eq(-1, old_val)
  52. -- 1. Call system() with invalid parameters.
  53. -- 2. Assert that v:shell_error was NOT modified.
  54. feed_command('call system({})')
  55. eq(old_val, eval('v:shell_error'))
  56. feed_command('call system([])')
  57. eq(old_val, eval('v:shell_error'))
  58. end)
  59. it('quotes arguments correctly #5280', function()
  60. local out =
  61. call('system', { testprg('printargs-test'), [[1]], [[2 "3]], [[4 ' 5]], [[6 ' 7']] })
  62. eq(0, eval('v:shell_error'))
  63. eq([[arg1=1;arg2=2 "3;arg3=4 ' 5;arg4=6 ' 7';]], out)
  64. out = call('system', { testprg('printargs-test'), [['1]], [[2 "3]] })
  65. eq(0, eval('v:shell_error'))
  66. eq([[arg1='1;arg2=2 "3;]], out)
  67. out = call('system', { testprg('printargs-test'), 'A\nB' })
  68. eq(0, eval('v:shell_error'))
  69. eq('arg1=A\nB;', out)
  70. end)
  71. it('calls executable in $PATH', function()
  72. if 0 == eval("executable('python3')") then
  73. pending('missing `python3`')
  74. end
  75. eq('foo\n', eval([[system(['python3', '-c', 'print("foo")'])]]))
  76. eq(0, eval('v:shell_error'))
  77. end)
  78. it('does NOT run in shell', function()
  79. if is_os('win') then
  80. eq(
  81. '%PATH%\n',
  82. eval(
  83. "system(['powershell', '-NoProfile', '-NoLogo', '-ExecutionPolicy', 'RemoteSigned', '-Command', 'Write-Output', '%PATH%'])"
  84. )
  85. )
  86. else
  87. eq('* $PATH %PATH%\n', eval("system(['echo', '*', '$PATH', '%PATH%'])"))
  88. end
  89. end)
  90. end)
  91. it('sets v:shell_error', function()
  92. if is_os('win') then
  93. eval([[system("cmd.exe /c exit")]])
  94. eq(0, eval('v:shell_error'))
  95. eval([[system("cmd.exe /c exit 1")]])
  96. eq(1, eval('v:shell_error'))
  97. eval([[system("cmd.exe /c exit 5")]])
  98. eq(5, eval('v:shell_error'))
  99. eval([[system('this-should-not-exist')]])
  100. eq(1, eval('v:shell_error'))
  101. else
  102. eval([[system("sh -c 'exit'")]])
  103. eq(0, eval('v:shell_error'))
  104. eval([[system("sh -c 'exit 1'")]])
  105. eq(1, eval('v:shell_error'))
  106. eval([[system("sh -c 'exit 5'")]])
  107. eq(5, eval('v:shell_error'))
  108. eval([[system('this-should-not-exist')]])
  109. eq(127, eval('v:shell_error'))
  110. end
  111. end)
  112. describe('executes shell function', function()
  113. local screen
  114. before_each(function()
  115. screen = Screen.new()
  116. end)
  117. if is_os('win') then
  118. local function test_more()
  119. eq('root = true', eval([[get(split(system('"more" ".editorconfig"'), "\n"), 0, '')]]))
  120. end
  121. local function test_shell_unquoting()
  122. eval([[system('"ping" "-n" "1" "127.0.0.1"')]])
  123. eq(0, eval('v:shell_error'))
  124. eq('"a b"\n', eval([[system('cmd /s/c "cmd /s/c "cmd /s/c "echo "a b""""')]]))
  125. eq(
  126. '"a b"\n',
  127. eval(
  128. [[system('powershell -NoProfile -NoLogo -ExecutionPolicy RemoteSigned -Command Write-Output ''\^"a b\^"''')]]
  129. )
  130. )
  131. end
  132. it('with shell=cmd.exe', function()
  133. command('set shell=cmd.exe')
  134. eq('""\n', eval([[system('echo ""')]]))
  135. eq('"a b"\n', eval([[system('echo "a b"')]]))
  136. eq('a \nb\n', eval([[system('echo a & echo b')]]))
  137. eq('a \n', eval([[system('echo a 2>&1')]]))
  138. test_more()
  139. eval([[system('cd "C:\Program Files"')]])
  140. eq(0, eval('v:shell_error'))
  141. test_shell_unquoting()
  142. end)
  143. it('with shell=cmd', function()
  144. command('set shell=cmd')
  145. eq('"a b"\n', eval([[system('echo "a b"')]]))
  146. test_more()
  147. test_shell_unquoting()
  148. end)
  149. it('with shell=$COMSPEC', function()
  150. local comspecshell = eval("fnamemodify($COMSPEC, ':t')")
  151. if comspecshell == 'cmd.exe' then
  152. command('set shell=$COMSPEC')
  153. eq('"a b"\n', eval([[system('echo "a b"')]]))
  154. test_more()
  155. test_shell_unquoting()
  156. else
  157. pending('$COMSPEC is not cmd.exe: ' .. comspecshell)
  158. end
  159. end)
  160. it('with powershell', function()
  161. n.set_shell_powershell()
  162. eq('a\nb\n', eval([[system('Write-Output a b')]]))
  163. eq('C:\\\n', eval([[system('cd c:\; (Get-Location).Path')]]))
  164. eq('a b\n', eval([[system('Write-Output "a b"')]]))
  165. end)
  166. end
  167. it('powershell w/ UTF-8 text #13713', function()
  168. if not n.has_powershell() then
  169. pending('powershell not found', function() end)
  170. return
  171. end
  172. n.set_shell_powershell()
  173. eq('ああ\n', eval([[system('Write-Output "ああ"')]]))
  174. -- Sanity test w/ default encoding
  175. -- * on Windows, expected to default to Western European enc
  176. -- * on Linux, expected to default to UTF8
  177. command([[let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ']])
  178. eq(is_os('win') and '??\n' or 'ああ\n', eval([[system('Write-Output "ああ"')]]))
  179. end)
  180. it('`echo` and waits for its return', function()
  181. feed(':call system("echo")<cr>')
  182. screen:expect([[
  183. ^ |
  184. {1:~ }|*12
  185. :call system("echo") |
  186. ]])
  187. end)
  188. it('prints verbose information', function()
  189. api.nvim_set_option_value('shell', 'fake_shell', {})
  190. api.nvim_set_option_value('shellcmdflag', 'cmdflag', {})
  191. screen:try_resize(72, 14)
  192. feed(':4verbose echo system("echo hi")<cr>')
  193. if is_os('win') then
  194. screen:expect { any = [[Executing command: "'fake_shell' 'cmdflag' '"echo hi"'"]] }
  195. else
  196. screen:expect { any = [[Executing command: "'fake_shell' 'cmdflag' 'echo hi'"]] }
  197. end
  198. feed('<cr>')
  199. end)
  200. it('self and total time recorded separately', function()
  201. local tempfile = t.tmpname()
  202. feed(':function! AlmostNoSelfTime()<cr>')
  203. feed('echo system("echo hi")<cr>')
  204. feed('endfunction<cr>')
  205. feed(':profile start ' .. tempfile .. '<cr>')
  206. feed(':profile func AlmostNoSelfTime<cr>')
  207. feed(':call AlmostNoSelfTime()<cr>')
  208. feed(':profile dump<cr>')
  209. feed(':edit ' .. tempfile .. '<cr>')
  210. local command_total_time = tonumber(n.fn.split(n.fn.getline(7))[2])
  211. local command_self_time = tonumber(n.fn.split(n.fn.getline(7))[3])
  212. t.neq(nil, command_total_time)
  213. t.neq(nil, command_self_time)
  214. end)
  215. it('`yes` interrupted with CTRL-C', function()
  216. feed(
  217. ':call system("'
  218. .. (is_os('win') and 'for /L %I in (1,0,2) do @echo y' or 'yes')
  219. .. '")<cr>'
  220. )
  221. screen:expect([[
  222. |
  223. {1:~ }|*12
  224. ]] .. (is_os('win') and [[
  225. :call system("for /L %I in (1,0,2) do @echo y") |]] or [[
  226. :call system("yes") |]]))
  227. feed('foo<c-c>')
  228. screen:expect([[
  229. ^ |
  230. {1:~ }|*12
  231. Type :qa and press <Enter> to exit Nvim |
  232. ]])
  233. end)
  234. it('`yes` interrupted with mapped CTRL-C', function()
  235. command('nnoremap <C-C> i')
  236. feed(
  237. ':call system("'
  238. .. (is_os('win') and 'for /L %I in (1,0,2) do @echo y' or 'yes')
  239. .. '")<cr>'
  240. )
  241. screen:expect([[
  242. |
  243. {1:~ }|*12
  244. ]] .. (is_os('win') and [[
  245. :call system("for /L %I in (1,0,2) do @echo y") |]] or [[
  246. :call system("yes") |]]))
  247. feed('foo<c-c>')
  248. screen:expect([[
  249. ^ |
  250. {1:~ }|*12
  251. {5:-- INSERT --} |
  252. ]])
  253. end)
  254. end)
  255. describe('passing no input', function()
  256. it('returns the program output', function()
  257. if is_os('win') then
  258. eq('echoed\n', eval('system("echo echoed")'))
  259. else
  260. eq('echoed', eval('system("printf echoed")'))
  261. end
  262. end)
  263. it('to backgrounded command does not crash', function()
  264. -- This is indeterminate, just exercise the codepath. May get E5677.
  265. feed_command(
  266. 'call system(has("win32") ? "start /b /wait cmd /c echo echoed" : "printf echoed &")'
  267. )
  268. local v_errnum = string.match(eval('v:errmsg'), '^E%d*:')
  269. if v_errnum then
  270. eq('E5677:', v_errnum)
  271. end
  272. assert_alive()
  273. end)
  274. end)
  275. describe('passing input', function()
  276. it('returns the program output', function()
  277. eq('input', eval('system("cat -", "input")'))
  278. end)
  279. it('to backgrounded command does not crash', function()
  280. -- This is indeterminate, just exercise the codepath. May get E5677.
  281. feed_command('call system(has("win32") ? "start /b /wait more" : "cat - &", "input")')
  282. local v_errnum = string.match(eval('v:errmsg'), '^E%d*:')
  283. if v_errnum then
  284. eq('E5677:', v_errnum)
  285. end
  286. assert_alive()
  287. end)
  288. it('works with an empty string', function()
  289. eq('test\n', eval('system("echo test", "")'))
  290. assert_alive()
  291. end)
  292. end)
  293. describe('passing a lot of input', function()
  294. it('returns the program output', function()
  295. local input = {}
  296. -- write more than 1mb of data, which should be enough to overcome
  297. -- the os buffer limit and force multiple event loop iterations to write
  298. -- everything
  299. for _ = 1, 0xffff do
  300. input[#input + 1] = '01234567890ABCDEFabcdef'
  301. end
  302. input = table.concat(input, '\n')
  303. api.nvim_set_var('input', input)
  304. eq(input, eval('system("cat -", g:input)'))
  305. end)
  306. end)
  307. describe('Number input', function()
  308. it('is treated as a buffer id', function()
  309. command("put ='text in buffer 1'")
  310. eq('\ntext in buffer 1\n', eval('system("cat", 1)'))
  311. eq('Vim(echo):E86: Buffer 42 does not exist', exc_exec('echo system("cat", 42)'))
  312. end)
  313. end)
  314. describe('with output containing NULs', function()
  315. local fname = 'Xtest_functional_vimscript_system_nuls'
  316. before_each(create_file_with_nuls(fname))
  317. after_each(delete_file(fname))
  318. it('replaces NULs by SOH characters', function()
  319. eq('part1\001part2\001part3\n', eval([[system('"cat" "]] .. fname .. [["')]]))
  320. end)
  321. end)
  322. describe('input passed as List', function()
  323. it('joins List items with linefeed characters', function()
  324. eq('line1\nline2\nline3', eval("system('cat -', ['line1', 'line2', 'line3'])"))
  325. end)
  326. -- Notice that NULs are converted to SOH when the data is read back. This
  327. -- is inconsistent and is a good reason for the existence of the
  328. -- `systemlist()` function, where input and output map to the same
  329. -- characters(see the following tests with `systemlist()` below)
  330. describe('with linefeed characters inside List items', function()
  331. it('converts linefeed characters to NULs', function()
  332. eq(
  333. 'l1\001p2\nline2\001a\001b\nl3',
  334. eval([[system('cat -', ["l1\np2", "line2\na\nb", 'l3'])]])
  335. )
  336. end)
  337. end)
  338. describe('with leading/trailing whitespace characters on items', function()
  339. it('preserves whitespace, replacing linefeeds by NULs', function()
  340. eq(
  341. 'line \nline2\001\n\001line3',
  342. eval([[system('cat -', ['line ', "line2\n", "\nline3"])]])
  343. )
  344. end)
  345. end)
  346. end)
  347. it("with a program that doesn't close stdout will exit properly after passing input", function()
  348. local out = eval(string.format("system('%s', 'clip-data')", testprg('streams-test')))
  349. assert(out:sub(0, 5) == 'pid: ', out)
  350. eq(0, vim.uv.kill(assert(tonumber(out:match('%d+'))), 'sigkill'))
  351. end)
  352. end)
  353. describe('systemlist()', function()
  354. -- Similar to `system()`, but returns List instead of String.
  355. before_each(clear)
  356. it('sets v:shell_error', function()
  357. if is_os('win') then
  358. eval([[systemlist("cmd.exe /c exit")]])
  359. eq(0, eval('v:shell_error'))
  360. eval([[systemlist("cmd.exe /c exit 1")]])
  361. eq(1, eval('v:shell_error'))
  362. eval([[systemlist("cmd.exe /c exit 5")]])
  363. eq(5, eval('v:shell_error'))
  364. eval([[systemlist('this-should-not-exist')]])
  365. eq(1, eval('v:shell_error'))
  366. else
  367. eval([[systemlist("sh -c 'exit'")]])
  368. eq(0, eval('v:shell_error'))
  369. eval([[systemlist("sh -c 'exit 1'")]])
  370. eq(1, eval('v:shell_error'))
  371. eval([[systemlist("sh -c 'exit 5'")]])
  372. eq(5, eval('v:shell_error'))
  373. eval([[systemlist('this-should-not-exist')]])
  374. eq(127, eval('v:shell_error'))
  375. end
  376. end)
  377. describe('executes shell function', function()
  378. local screen
  379. before_each(function()
  380. screen = Screen.new()
  381. end)
  382. it('`echo` and waits for its return', function()
  383. feed(':call systemlist("echo")<cr>')
  384. screen:expect([[
  385. ^ |
  386. {1:~ }|*12
  387. :call systemlist("echo") |
  388. ]])
  389. end)
  390. it('`yes` interrupted with CTRL-C', function()
  391. feed(':call systemlist("yes | xargs")<cr>')
  392. screen:expect([[
  393. |
  394. {1:~ }|*12
  395. :call systemlist("yes | xargs") |
  396. ]])
  397. feed('<c-c>')
  398. screen:expect([[
  399. ^ |
  400. {1:~ }|*12
  401. Type :qa and press <Enter> to exit Nvim |
  402. ]])
  403. end)
  404. end)
  405. describe('passing string with linefeed characters as input', function()
  406. it('splits the output on linefeed characters', function()
  407. eq({ 'abc', 'def', 'ghi' }, eval([[systemlist("cat -", "abc\ndef\nghi")]]))
  408. end)
  409. end)
  410. describe('passing a lot of input', function()
  411. it('returns the program output', function()
  412. local input = {}
  413. for _ = 1, 0xffff do
  414. input[#input + 1] = '01234567890ABCDEFabcdef'
  415. end
  416. api.nvim_set_var('input', input)
  417. eq(input, eval('systemlist("cat -", g:input)'))
  418. end)
  419. end)
  420. describe('with output containing NULs', function()
  421. local fname = 'Xtest_functional_vimscript_systemlist_nuls'
  422. before_each(function()
  423. command('set ff=unix')
  424. create_file_with_nuls(fname)()
  425. end)
  426. after_each(delete_file(fname))
  427. it('replaces NULs by newline characters', function()
  428. eq({ 'part1\npart2\npart3' }, eval([[systemlist('"cat" "]] .. fname .. [["')]]))
  429. end)
  430. end)
  431. describe('input passed as List', function()
  432. it('joins list items with linefeed characters', function()
  433. eq({ 'line1', 'line2', 'line3' }, eval("systemlist('cat -', ['line1', 'line2', 'line3'])"))
  434. end)
  435. -- Unlike `system()` which uses SOH to represent NULs, with `systemlist()`
  436. -- input and output are the same.
  437. describe('with linefeed characters inside list items', function()
  438. it('converts linefeed characters to NULs', function()
  439. eq(
  440. { 'l1\np2', 'line2\na\nb', 'l3' },
  441. eval([[systemlist('cat -', ["l1\np2", "line2\na\nb", 'l3'])]])
  442. )
  443. end)
  444. end)
  445. describe('with leading/trailing whitespace characters on items', function()
  446. it('preserves whitespace, replacing linefeeds by NULs', function()
  447. eq(
  448. { 'line ', 'line2\n', '\nline3' },
  449. eval([[systemlist('cat -', ['line ', "line2\n", "\nline3"])]])
  450. )
  451. end)
  452. end)
  453. end)
  454. describe('handles empty lines', function()
  455. it('in the middle', function()
  456. eq({ 'line one', '', 'line two' }, eval("systemlist('cat',['line one','','line two'])"))
  457. end)
  458. it('in the beginning', function()
  459. eq({ '', 'line one', 'line two' }, eval("systemlist('cat',['','line one','line two'])"))
  460. end)
  461. end)
  462. describe('when keepempty option is', function()
  463. it('0, ignores trailing newline', function()
  464. eq({ 'aa', 'bb' }, eval("systemlist('cat',['aa','bb'],0)"))
  465. eq({ 'aa', 'bb' }, eval("systemlist('cat',['aa','bb',''],0)"))
  466. end)
  467. it('1, preserves trailing newline', function()
  468. eq({ 'aa', 'bb' }, eval("systemlist('cat',['aa','bb'],1)"))
  469. eq({ 'aa', 'bb', '' }, eval("systemlist('cat',['aa','bb',''],2)"))
  470. end)
  471. end)
  472. it("with a program that doesn't close stdout will exit properly after passing input", function()
  473. local out = eval(string.format("systemlist('%s', 'clip-data')", testprg('streams-test')))
  474. assert(out[1]:sub(0, 5) == 'pid: ', out)
  475. eq(0, vim.uv.kill(assert(tonumber(out[1]:match('%d+'))), 'sigkill'))
  476. end)
  477. it('powershell w/ UTF-8 text #13713', function()
  478. if not n.has_powershell() then
  479. pending('powershell not found', function() end)
  480. return
  481. end
  482. n.set_shell_powershell()
  483. eq({ is_os('win') and 'あ\r' or 'あ' }, eval([[systemlist('Write-Output あ')]]))
  484. -- Sanity test w/ default encoding
  485. -- * on Windows, expected to default to Western European enc
  486. -- * on Linux, expected to default to UTF8
  487. command([[let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ']])
  488. eq({ is_os('win') and '?\r' or 'あ' }, eval([[systemlist('Write-Output あ')]]))
  489. end)
  490. end)
  491. describe('shell :!', function()
  492. before_each(clear)
  493. it(':{range}! with powershell filter/redirect #16271 #19250', function()
  494. local screen = Screen.new(500, 8)
  495. local found = n.set_shell_powershell(true)
  496. insert([[
  497. 3
  498. 1
  499. 4
  500. 2]])
  501. if is_os('win') then
  502. feed(':4verbose %!sort /R<cr>')
  503. screen:expect {
  504. any = [[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]],
  505. }
  506. else
  507. feed(':4verbose %!sort -r<cr>')
  508. screen:expect {
  509. any = [[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]],
  510. }
  511. end
  512. feed('<CR>')
  513. if found then
  514. -- Not using fake powershell, so we can test the result.
  515. expect([[
  516. 4
  517. 3
  518. 2
  519. 1]])
  520. end
  521. end)
  522. it(':{range}! without redirecting to buffer', function()
  523. local screen = Screen.new(500, 10)
  524. insert([[
  525. 3
  526. 1
  527. 4
  528. 2]])
  529. feed(':4verbose %w !sort<cr>')
  530. if is_os('win') then
  531. screen:expect {
  532. any = [[Executing command: .?sort %< .*]],
  533. }
  534. else
  535. screen:expect {
  536. any = [[Executing command: .?%(sort%) %< .*]],
  537. }
  538. end
  539. feed('<CR>')
  540. n.set_shell_powershell(true)
  541. feed(':4verbose %w !sort<cr>')
  542. screen:expect {
  543. any = [[Executing command: .?& { Get%-Content .* | & sort }]],
  544. }
  545. feed('<CR>')
  546. n.expect_exit(command, 'qall!')
  547. end)
  548. end)