diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-12 04:47:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-12 04:47:49 +0800 |
commit | 23f9c21952f1ddad594eb54b9d1cfbaf80b929ef (patch) | |
tree | 0e6bdcc85055f1ed7b81e3cf29805cb9c8f10841 /test | |
parent | 6e47a81bc1c43a6188e17d3d77bbc88b7932269c (diff) | |
download | lua-language-server-23f9c21952f1ddad594eb54b9d1cfbaf80b929ef.zip |
fix missed parent
Diffstat (limited to 'test')
-rw-r--r-- | test/full/self.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/full/self.lua b/test/full/self.lua index 5fb1fc7a..93cfe715 100644 --- a/test/full/self.lua +++ b/test/full/self.lua @@ -4,6 +4,7 @@ local furi = require 'file-uri' local diag = require 'provider.diagnostic' local config = require 'config' local ws = require 'workspace' +local guide = require 'parser.guide' local path = ROOT / 'script' @@ -35,6 +36,10 @@ local clock = os.clock() ---@diagnostic disable: await-in-sync for uri in files.eachFile() do + local status = files.getState(uri) + guide.eachSource(status.ast, function (src) + assert(src.parent ~= nil or src.type == 'main') + end) local fileClock = os.clock() diag.doDiagnostic(uri, true) print('诊断文件耗时:', os.clock() - fileClock, uri) |