aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/python3_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-24 02:14:14 +0200
committerGitHub <noreply@github.com>2017-04-24 02:14:14 +0200
commit7f6d3d305269fd1139bc2aec9a91bf98ad595199 (patch)
tree965d18fb11d25959e709a18d1c9d1fca0c4df432 /test/functional/provider/python3_spec.lua
parent1fe8945748620713402cab77a46501ec5311778b (diff)
parent086c354a0aad2769042dc91bf5bad021109f56e4 (diff)
downloadrneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.tar.gz
rneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.tar.bz2
rneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.zip
Merge #6569 from justinmk/apierror
api: Do not truncate errors <1 MB
Diffstat (limited to 'test/functional/provider/python3_spec.lua')
-rw-r--r--test/functional/provider/python3_spec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua
index a4e9a49c8a..89a546675f 100644
--- a/test/functional/provider/python3_spec.lua
+++ b/test/functional/provider/python3_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local eval, command, feed = helpers.eval, helpers.command, helpers.feed
local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert
local expect, write_file = helpers.expect, helpers.write_file
+local feed_command = helpers.feed_command
do
clear()
@@ -30,6 +31,15 @@ describe('python3 commands and functions', function()
eq({100, 0}, eval('g:set_by_python3'))
end)
+ it('does not truncate error message <1 MB', function()
+ -- XXX: Python limits the error name to 200 chars, so this test is
+ -- mostly bogus.
+ local very_long_symbol = string.rep('a', 1200)
+ feed_command(':silent! py3 print('..very_long_symbol..' b)')
+ -- Truncated error message would not contain this (last) line.
+ eq('SyntaxError: invalid syntax', eval('v:errmsg'))
+ end)
+
it('python3_execute with nested commands', function()
command([[python3 vim.command('python3 vim.command("python3 vim.command(\'let set_by_nested_python3 = 555\')")')]])
eq(555, eval('g:set_by_nested_python3'))