summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-23 16:22:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-23 16:22:13 +0800
commitac1bddb7ca2f3b497085b06f310280f7d7ec0fb3 (patch)
tree2a4b5bb7fe21d258e7e31589e146e610ffbab0e1 /test/type_inference
parent366d163edf1373ca4f7c56ef44b77b818d9ee4f8 (diff)
downloadlua-language-server-ac1bddb7ca2f3b497085b06f310280f7d7ec0fb3.zip
fix #571
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 7d5ea44f..3ca46cda 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2,6 +2,7 @@ local files = require 'files'
local vm = require 'vm'
local guide = require 'parser.guide'
local infer = require 'core.infer'
+local config = require 'config'
rawset(_G, 'TEST', true)
@@ -746,3 +747,23 @@ return test
TEST 'function' [[
string.gsub():gsub():<?gsub?>()
]]
+
+config.config.hover.enumsLimit = 5
+TEST 'a|b|c|d|e...(+5)' [[
+---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j'
+local <?t?>
+]]
+
+config.config.hover.enumsLimit = 1
+TEST 'a...(+9)' [[
+---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j'
+local <?t?>
+]]
+
+config.config.hover.enumsLimit = 0
+TEST '...(+10)' [[
+---@type 'a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'i'|'j'
+local <?t?>
+]]
+
+config.config.hover.enumsLimit = 5