summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-08-01 16:19:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-08-01 16:19:34 +0800
commit1c7755b317d1e811a3f71f3ec745800555575fd0 (patch)
tree95dcb4398c7feab2ce415b92f202a8ae404ebaff
parenta72aa21a2f1bdaccabc757b0c8ecef17959785fd (diff)
downloadlua-language-server-1c7755b317d1e811a3f71f3ec745800555575fd0.zip
删掉没用的测试
-rw-r--r--test.lua1
-rw-r--r--test/type_formatting/init.lua209
2 files changed, 0 insertions, 210 deletions
diff --git a/test.lua b/test.lua
index fa49655f..986b0a06 100644
--- a/test.lua
+++ b/test.lua
@@ -66,7 +66,6 @@ local function testAll()
test 'command'
test 'document_symbol'
test 'code_action'
- test 'type_formatting'
test 'other'
end
diff --git a/test/type_formatting/init.lua b/test/type_formatting/init.lua
deleted file mode 100644
index 4e9ce556..00000000
--- a/test/type_formatting/init.lua
+++ /dev/null
@@ -1,209 +0,0 @@
-local core = require 'core.type-formatting'
-local files = require 'files'
-local util = require 'utility'
-local catch = require 'catch'
-
-rawset(_G, 'TEST', true)
-
-function TEST(script)
- return function(expect)
- local newScript, catched = catch(script, '?')
- files.setText(TESTURI, newScript)
- local edits = core(TESTURI, catched['?'][1][1], expect.ch)
- if edits then
- assert(expect.edits)
- assert(util.equal(edits, expect.edits))
- else
- assert(expect.edits == nil)
- end
- files.remove(TESTURI)
- end
-end
-
-TEST [[
-if true then <??> end
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 12,
- finish = 13,
- text = '\n\t',
- },
- {
- start = 13,
- finish = 15,
- text = '',
- },
- {
- start = 15,
- finish = 15,
- text = '\ne',
- },
- }
-}
-
-TEST [[
-if true then <??>end
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 12,
- finish = 13,
- text = '\n\t',
- },
- {
- start = 13,
- finish = 14,
- text = '',
- },
- {
- start = 14,
- finish = 14,
- text = '\ne',
- },
- }
-}
-
-TEST [[
-if true then<??>end
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 12,
- finish = 12,
- text = '\n\t',
- },
- {
- start = 12,
- finish = 13,
- text = '',
- },
- {
- start = 13,
- finish = 13,
- text = '\ne',
- },
- }
-}
-
-TEST [[
- if true then<??>end
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 16,
- finish = 16,
- text = '\n \t',
- },
- {
- start = 16,
- finish = 17,
- text = '',
- },
- {
- start = 17,
- finish = 17,
- text = '\n e',
- },
- }
-}
-
-TEST [[
-local x = 1
-<??>
-]]
-{
- ch = '\n',
- edits = nil,
-}
-
-TEST [[
-local x = 'if 1 then'
- <??>
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 10000,
- finish = 10004,
- text = '',
- }
- }
-}
-
-TEST [[
-local x = 'do'
- <??>
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 10000,
- finish = 10004,
- text = '',
- }
- }
-}
-
-TEST [[
-local x = 'function'
- <??>
-]]
-{
- ch = '\n',
- edits = {
- {
- start = 10000,
- finish = 10004,
- text = '',
- }
- }
-}
-
-TEST [[
-do
- <??>
-]]
-{
- ch = '\n',
- edits = nil
-}
-
-TEST [[
-do
- <??>
-end
-]]
-{
- ch = '\n',
- edits = nil
-}
-
-TEST [[
-function ()
- <??>
-]]
-{
- ch = '\n',
- edits = nil
-}
-
-TEST [[
-function ()
- <??>
-end
-]]
-{
- ch = '\n',
- edits = nil
-}