diff options
Diffstat (limited to 'test/tclient/tests/jump-source.lua')
-rw-r--r-- | test/tclient/tests/jump-source.lua | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/test/tclient/tests/jump-source.lua b/test/tclient/tests/jump-source.lua index dd7666c3..84a4dcd5 100644 --- a/test/tclient/tests/jump-source.lua +++ b/test/tclient/tests/jump-source.lua @@ -1,9 +1,10 @@ -local lclient = require 'lclient' -local util = require 'utility' -local ws = require 'workspace' -local files = require 'files' -local furi = require 'file-uri' -local fs = require 'bee.filesystem' +local lclient = require 'lclient' +local util = require 'utility' +local ws = require 'workspace' +local files = require 'files' +local furi = require 'file-uri' +local fs = require 'bee.filesystem' +local platform = require 'bee.platform' ---@async lclient():start(function (client) @@ -162,28 +163,30 @@ print(D3) position = { line = 9, character = 7 }, }) - assert(util.equal(locations, { - { - uri = 'file:///d%3A/xxx/2.lua', - range = { - start = { line = 0, character = 0 }, - ['end'] = { line = 0, character = 0 }, + if platform.OS == 'Windows' then + assert(util.equal(locations, { + { + uri = 'file:///d%3A/xxx/2.lua', + range = { + start = { line = 0, character = 0 }, + ['end'] = { line = 0, character = 0 }, + } } - } - })) - - local locations = client:awaitRequest('textDocument/definition', { - textDocument = { uri = furi.encode('main.lua') }, - position = { line = 10, character = 7 }, - }) - - assert(util.equal(locations, { - { - uri = 'file:///d%3A/test/2.lua', - range = { - start = { line = 0, character = 0 }, - ['end'] = { line = 0, character = 0 }, + })) + + local locations = client:awaitRequest('textDocument/definition', { + textDocument = { uri = furi.encode('main.lua') }, + position = { line = 10, character = 7 }, + }) + + assert(util.equal(locations, { + { + uri = 'file:///d%3A/test/2.lua', + range = { + start = { line = 0, character = 0 }, + ['end'] = { line = 0, character = 0 }, + } } - } - })) + })) + end end) |