aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/thread_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-03-03 21:00:00 +0100
committerGitHub <noreply@github.com>2022-03-03 21:00:00 +0100
commite23af71d35a3d31d476168d3a0a822048aa2c54f (patch)
tree9a6fc110af552e946aa24d4bb7b1b16008edd742 /test/functional/lua/thread_spec.lua
parent13cabfedb2e79664b46ab44523f28a136b6ad2a8 (diff)
parentf9faba88fdc46b2dd1a979a37ba61b000830ff3a (diff)
downloadrneovim-e23af71d35a3d31d476168d3a0a822048aa2c54f.tar.gz
rneovim-e23af71d35a3d31d476168d3a0a822048aa2c54f.tar.bz2
rneovim-e23af71d35a3d31d476168d3a0a822048aa2c54f.zip
Merge pull request #17567 from bfredl/preload
refactor(lua): regularize builtin modules, phase 1
Diffstat (limited to 'test/functional/lua/thread_spec.lua')
-rw-r--r--test/functional/lua/thread_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/lua/thread_spec.lua b/test/functional/lua/thread_spec.lua
index 2e0ab7bdff..e183ce3a57 100644
--- a/test/functional/lua/thread_spec.lua
+++ b/test/functional/lua/thread_spec.lua
@@ -102,6 +102,28 @@ describe('thread', function()
print in thread |
]])
end)
+
+ it('vim.inspect', function()
+ exec_lua [[
+ local thread = vim.loop.new_thread(function()
+ print(vim.inspect({1,2}))
+ end)
+ vim.loop.thread_join(thread)
+ ]]
+
+ screen:expect([[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ { 1, 2 } |
+ ]])
+ end)
end)
describe('vim.*', function()