summaryrefslogtreecommitdiff
path: root/test/basic/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-13 16:32:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-13 16:32:37 +0800
commitbd8b30417e87959510545847d4db580d34603943 (patch)
tree02d049e6e1942fec7a1427ee2473d43d76dead6c /test/basic/init.lua
parent6475fa2e14a22a81e45e1c5a1c6e90121077511d (diff)
downloadlua-language-server-bd8b30417e87959510545847d4db580d34603943.zip
mark id
Diffstat (limited to 'test/basic/init.lua')
-rw-r--r--test/basic/init.lua221
1 files changed, 2 insertions, 219 deletions
diff --git a/test/basic/init.lua b/test/basic/init.lua
index a3a11f62..d3a84152 100644
--- a/test/basic/init.lua
+++ b/test/basic/init.lua
@@ -1,219 +1,2 @@
-local files = require 'files'
-local tm = require 'text-merger'
-
-local function TEST(source)
- return function (expect)
- return function (changes)
- files.removeAll()
- files.setText('', source)
- local text = tm('', changes)
- assert(text == expect)
- end
- end
-end
-
-TEST [[
-
-
-function Test(self)
-
-end
-]][[
-
-
-function Test(self)
-
-end
-
-asser]]{
- [1] = {
- range = {
- ["end"] = {
- character = 0,
- line = 5,
- },
- start = {
- character = 0,
- line = 5,
- },
- },
- rangeLength = 0,
- text = "\
-",
- },
- [2] = {
- range = {
- ["end"] = {
- character = 0,
- line = 6,
- },
- start = {
- character = 0,
- line = 6,
- },
- },
- rangeLength = 0,
- text = "a",
- },
- [3] = {
- range = {
- ["end"] = {
- character = 1,
- line = 6,
- },
- start = {
- character = 1,
- line = 6,
- },
- },
- rangeLength = 0,
- text = "s",
- },
- [4] = {
- range = {
- ["end"] = {
- character = 2,
- line = 6,
- },
- start = {
- character = 2,
- line = 6,
- },
- },
- rangeLength = 0,
- text = "s",
- },
- [5] = {
- range = {
- ["end"] = {
- character = 3,
- line = 6,
- },
- start = {
- character = 3,
- line = 6,
- },
- },
- rangeLength = 0,
- text = "e",
- },
- [6] = {
- range = {
- ["end"] = {
- character = 4,
- line = 6,
- },
- start = {
- character = 4,
- line = 6,
- },
- },
- rangeLength = 0,
- text = "r",
- },
-}
-
-TEST [[
-local mt = {}
-
-function mt['xxx']()
-
-
-
-end
-]] [[
-local mt = {}
-
-function mt['xxx']()
-
-end
-]] {
- [1] = {
- range = {
- ["end"] = {
- character = 4,
- line = 5,
- },
- start = {
- character = 4,
- line = 3,
- },
- },
- rangeLength = 8,
- text = "",
- },
-}
-
-TEST [[
-local mt = {}
-
-function mt['xxx']()
-
-end
-]] [[
-local mt = {}
-
-function mt['xxx']()
- p
-end
-]] {
- [1] = {
- range = {
- ["end"] = {
- character = 4,
- line = 3,
- },
- start = {
- character = 4,
- line = 3,
- },
- },
- rangeLength = 0,
- text = "p",
- },
-}
-
-TEST [[
-print(12345)
-]] [[
-print(123
-45)
-]] {
- [1] = {
- range = {
- ["end"] = {
- character = 9,
- line = 0,
- },
- start = {
- character = 9,
- line = 0,
- },
- },
- rangeLength = 0,
- text = "\
-",
- },
-}
-
-TEST [[
-print(123
-45)
-]] [[
-print(12345)
-]] {
- [1] = {
- range = {
- ["end"] = {
- character = 0,
- line = 1,
- },
- start = {
- character = 9,
- line = 0,
- },
- },
- rangeLength = 2,
- text = "",
- },
-}
+require 'basic.textmerger'
+require 'basic.linker'