diff options
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) |