diff options
author | dm1try <me@dmitry.it> | 2020-12-08 01:47:28 +0300 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-12-10 10:53:28 +0100 |
commit | 3421485253eca065eb9b0a3031228313c278f435 (patch) | |
tree | d13b451545e31dcc3ce1c20f585cff50e45c604b /test/functional/lua/vim_spec.lua | |
parent | 85bce4d13d405fe009428def4fbead54bb741008 (diff) | |
download | rneovim-3421485253eca065eb9b0a3031228313c278f435.tar.gz rneovim-3421485253eca065eb9b0a3031228313c278f435.tar.bz2 rneovim-3421485253eca065eb9b0a3031228313c278f435.zip |
runtime: propagate lua parsing errors while using "require"
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index e9e1f7ec12..e253db5297 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1453,3 +1453,18 @@ describe('lua stdlib', function() end) end) end) + +describe('lua: require("mod") from packages', function() + before_each(function() + command('set rtp+=test/functional/fixtures') + end) + + it('propagates syntax error', function() + local syntax_error_msg = exec_lua [[ + local _, err = pcall(require, "syntax_error") + return err + ]] + + matches("unexpected symbol", syntax_error_msg) + end) +end) |