blob: baf42978c77e4416da6d668560e5cffc747fd267 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
local lclient = require 'tclient.lclient'
local util = require 'utility'
local ws = require 'workspace'
local files = require 'files'
local furi = require 'file-uri'
local fs = require 'bee.filesystem'
local libraryPath = LOGPATH .. '/large-file-library'
local largeFilePath = LOGPATH .. '/large-file-library/large-file.lua'
---@async
lclient():start(function (client)
client:registerFakers()
client:register('workspace/configuration', function ()
return {
{
['workspace.library'] = { libraryPath }
},
}
end)
fs.create_directories(fs.path(libraryPath))
util.saveFile(largeFilePath, string.rep('--this is a large file\n', 100000))
client:initialize()
ws.awaitReady()
assert(files.getState(furi.encode(largeFilePath)) ~= nil)
end)
|