diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-28 16:50:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-28 16:59:23 +0800 |
commit | 2d5b2cbfa492e80841d4e8822106434f7ee4f303 (patch) | |
tree | a962420c73f31ee200ac2081c3fa3203b29e7fc8 /test | |
parent | e0ff9a81c623efc1882b1fd4fad8389c7fa3ca63 (diff) | |
download | lua-language-server-2d5b2cbfa492e80841d4e8822106434f7ee4f303.zip |
add `vm.getDefFields`
Diffstat (limited to 'test')
-rw-r--r-- | test/full/init.lua | 1 | ||||
-rw-r--r-- | test/full/self.lua | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/full/init.lua b/test/full/init.lua index f370671e..ad34da7d 100644 --- a/test/full/init.lua +++ b/test/full/init.lua @@ -11,3 +11,4 @@ end require 'full.normal' require 'full.example' require 'full.dirty' +require 'full.self' diff --git a/test/full/self.lua b/test/full/self.lua new file mode 100644 index 00000000..247702ae --- /dev/null +++ b/test/full/self.lua @@ -0,0 +1,29 @@ +local files = require 'files' +local fsu = require 'fs-utility' +local furi = require 'file-uri' +local diag = require 'provider.diagnostic' +local config = require 'config' +files.removeAll() + +fsu.scanDirectory(ROOT, function (path) + if path:extension():string() ~= '.lua' then + return + end + local uri = furi.encode(path:string()) + local text = fsu.loadFile(path) + files.setText(uri, text) + files.open(uri) +end) + +config.config.diagnostics.disable['undefined-field'] = true +config.config.diagnostics.disable['redundant-parameter'] = true +diag.start() + +local clock = os.clock() + +for uri in files.eachFile() do + diag.doDiagnostic(uri) +end + +local passed = os.clock() - clock +print('基准全量诊断用时:', passed) |