aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfutsuuu <futsuuu123@gmail.com>2024-07-23 20:40:43 +0900
committerLewis Russell <me@lewisr.dev>2024-08-13 14:05:10 +0100
commitb6219210745c67899900bae9f12dd231c9857e37 (patch)
tree8d87738534a6ab11a5c5b83171a90370377c7bbb
parent67bb0cfa79bc7eea5103ce9a00fc6176077c135b (diff)
downloadrneovim-b6219210745c67899900bae9f12dd231c9857e37.tar.gz
rneovim-b6219210745c67899900bae9f12dd231c9857e37.tar.bz2
rneovim-b6219210745c67899900bae9f12dd231c9857e37.zip
test: add a test to check the indentation
-rw-r--r--test/functional/lua/loader_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/lua/loader_spec.lua b/test/functional/lua/loader_spec.lua
index f13e6664c5..6ab23e725c 100644
--- a/test/functional/lua/loader_spec.lua
+++ b/test/functional/lua/loader_spec.lua
@@ -88,4 +88,18 @@ describe('vim.loader', function()
eq(1, exec_lua('return loadfile(...)()', tmp1))
eq(2, exec_lua('return loadfile(...)()', tmp2))
end)
+
+ it('correct indent on error message (#29809)', function()
+ exec_lua [[
+ vim.loader.enable()
+
+ local success, errmsg = pcall(require, 'non_existent_module')
+ assert(not success)
+
+ errmsg = errmsg:gsub("^module 'non_existent_module' not found:\n", '')
+ for line in vim.gsplit(errmsg, '\n') do
+ assert(line:find('^\t'), ('not indented: %q'):format(line))
+ end
+ ]]
+ end)
end)