diff options
Diffstat (limited to 'test-beta')
-rw-r--r-- | test-beta/crossfile/definition.lua | 40 | ||||
-rw-r--r-- | test-beta/crossfile/references.lua | 40 | ||||
-rw-r--r-- | test-beta/full/example.lua | 2 |
3 files changed, 82 insertions, 0 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua index 7cf12c74..3b2c1f14 100644 --- a/test-beta/crossfile/definition.lua +++ b/test-beta/crossfile/definition.lua @@ -411,6 +411,46 @@ TEST { }, } +TEST { + { + path = 'a.lua', + content = [[ + local function <!f!>() + end + + return { + <!f!> = f, + } + ]] + }, + { + path = 'c.lua', + content = [[ + local t = require 'a' + local f = t.f + + f() + + return { + f = f, + } + ]] + }, + { + path = 'b.lua', + content = [[ + local t = require 'a' + local <!f!> = t.f + + <?f?>() + + return { + f = f, + } + ]] + } +} + --TEST { -- { -- path = 'a.lua', diff --git a/test-beta/crossfile/references.lua b/test-beta/crossfile/references.lua index a1747dac..67097f3a 100644 --- a/test-beta/crossfile/references.lua +++ b/test-beta/crossfile/references.lua @@ -247,3 +247,43 @@ TEST { ]], }, } + +TEST { + { + path = 'a.lua', + content = [[ + local function <!f!>() + end + + return { + <!f!> = <!f!>, + } + ]] + }, + { + path = 'c.lua', + content = [[ + local t = require 'a' + local <!f!> = t.<!f!> + + <!f!>() + + return { + <!f!> = <!f!>, + } + ]] + }, + { + path = 'b.lua', + content = [[ + local t = require 'a' + local <!f!> = t.<!f!> + + <?f?>() + + return { + <!f!> = <!f!>, + } + ]] + } +} diff --git a/test-beta/full/example.lua b/test-beta/full/example.lua index 5b096655..86b34776 100644 --- a/test-beta/full/example.lua +++ b/test-beta/full/example.lua @@ -2,9 +2,11 @@ local util = require 'utility' local parser = require 'parser' local files = require 'files' local diag = require 'core.diagnostics' +local config = require 'config' -- 临时 local function testIfExit(path) + config.config.workspace.maxPreload = 1000000000 local buf = util.loadFile(path:string()) if buf then local vm |