mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
test(python3_spec): use a pattern to match SyntaxError message (#17705)
This commit is contained in:
parent
9e6bc228ec
commit
c45644f994
@ -9,6 +9,7 @@ local missing_provider = helpers.missing_provider
|
|||||||
local matches = helpers.matches
|
local matches = helpers.matches
|
||||||
local pcall_err = helpers.pcall_err
|
local pcall_err = helpers.pcall_err
|
||||||
local funcs = helpers.funcs
|
local funcs = helpers.funcs
|
||||||
|
local dedent = helpers.dedent
|
||||||
|
|
||||||
do
|
do
|
||||||
clear()
|
clear()
|
||||||
@ -49,7 +50,12 @@ describe('python3 provider', function()
|
|||||||
local very_long_symbol = string.rep('a', 1200)
|
local very_long_symbol = string.rep('a', 1200)
|
||||||
feed_command(':silent! py3 print('..very_long_symbol..' b)')
|
feed_command(':silent! py3 print('..very_long_symbol..' b)')
|
||||||
-- Error message will contain this (last) line.
|
-- Error message will contain this (last) line.
|
||||||
eq('Error invoking \'python_execute\' on channel 3 (python3-script-host):\n File "<string>", line 1\n print('..very_long_symbol..' b)\n '..string.rep(' ',1200)..' ^\nSyntaxError: invalid syntax', eval('v:errmsg'))
|
matches(string.format(dedent([[
|
||||||
|
^Error invoking 'python_execute' on channel 3 %%(python3%%-script%%-host%%):
|
||||||
|
File "<string>", line 1
|
||||||
|
print%%(%s b%%)
|
||||||
|
%%C*
|
||||||
|
SyntaxError: invalid syntax%%C*$]]), very_long_symbol), eval('v:errmsg'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('python3_execute with nested commands', function()
|
it('python3_execute with nested commands', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user