fix(ci): test
This commit is contained in:
parent
b2083bf649
commit
069df71871
2 changed files with 1 additions and 3 deletions
|
|
@ -69,7 +69,7 @@ end
|
||||||
|
|
||||||
---@param language_config table
|
---@param language_config table
|
||||||
---@param substitutions table<string, string>
|
---@param substitutions table<string, string>
|
||||||
---@return {code: integer, stderr: string}
|
---@return {code: integer, stdout: string, stderr: string}
|
||||||
function M.compile_generic(language_config, substitutions)
|
function M.compile_generic(language_config, substitutions)
|
||||||
vim.validate({
|
vim.validate({
|
||||||
language_config = { language_config, 'table' },
|
language_config = { language_config, 'table' },
|
||||||
|
|
|
||||||
|
|
@ -396,14 +396,12 @@ describe('cp.execute', function()
|
||||||
|
|
||||||
describe('integration tests', function()
|
describe('integration tests', function()
|
||||||
it('captures interleaved stderr/stdout with ANSI colors', function()
|
it('captures interleaved stderr/stdout with ANSI colors', function()
|
||||||
local start_time = vim.uv.hrtime()
|
|
||||||
local python_cmd = {
|
local python_cmd = {
|
||||||
'sh',
|
'sh',
|
||||||
'-c',
|
'-c',
|
||||||
"python3 -c \"import sys; print('\\033[32mstdout: \\033[1mSuccess\\033[0m'); print('\\033[31mstderr: \\033[1mWarning\\033[0m', file=sys.stderr); print('plain stdout')\" 2>&1",
|
"python3 -c \"import sys; print('\\033[32mstdout: \\033[1mSuccess\\033[0m'); print('\\033[31mstderr: \\033[1mWarning\\033[0m', file=sys.stderr); print('plain stdout')\" 2>&1",
|
||||||
}
|
}
|
||||||
local result = vim.system(python_cmd, { timeout = 2000, text = false }):wait()
|
local result = vim.system(python_cmd, { timeout = 2000, text = false }):wait()
|
||||||
local execution_time = (vim.uv.hrtime() - start_time) / 1000000
|
|
||||||
|
|
||||||
local ansi = require('cp.ansi')
|
local ansi = require('cp.ansi')
|
||||||
local combined_output = ansi.bytes_to_string(result.stdout or '')
|
local combined_output = ansi.bytes_to_string(result.stdout or '')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue