summaryrefslogtreecommitdiff
path: root/test/tclient
diff options
context:
space:
mode:
Diffstat (limited to 'test/tclient')
-rw-r--r--test/tclient/tests/single-mode.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/tclient/tests/single-mode.lua b/test/tclient/tests/single-mode.lua
index 4e14415b..25463f55 100644
--- a/test/tclient/tests/single-mode.lua
+++ b/test/tclient/tests/single-mode.lua
@@ -15,6 +15,9 @@ lclient():start(function (client)
text = [[
local x
print(x)
+
+TEST = 1
+print(TEST)
]]
}
})
@@ -42,4 +45,19 @@ print(x)
})
assert(#locations > 0)
+
+ local locations = client:awaitRequest('textDocument/definition', {
+ textDocument = { uri = 'file://single-file.lua' },
+ position = { line = 3, character = 0 },
+ })
+
+ assert(util.equal(locations, {
+ {
+ uri = 'file://single-file.lua',
+ range = {
+ start = { line = 3, character = 0 },
+ ['end'] = { line = 3, character = 4 },
+ }
+ }
+ }))
end)