From de5cf09cf98e20d8d3296ad6933ff2741acf83f7 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 26 Feb 2024 18:00:46 +0100 Subject: refactor(metadata): generate all metadata in lua Then we can just load metadata in C as a single msgpack blob. Which also can be used directly as binarly data, instead of first unpacking all the functions and ui_events metadata to immediately pack it again, which was a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object` which will get yak shaved in the next PR) --- test/unit/os/fileio_spec.lua | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'test') diff --git a/test/unit/os/fileio_spec.lua b/test/unit/os/fileio_spec.lua index cc5a0d84c3..617141fd3a 100644 --- a/test/unit/os/fileio_spec.lua +++ b/test/unit/os/fileio_spec.lua @@ -65,10 +65,6 @@ local function file_write(fp, buf) return m.file_write(fp, buf, #buf) end -local function msgpack_file_write(fp, buf) - return m.msgpack_file_write(fp, buf, #buf) -end - local function file_read(fp, size) local buf = nil if size == nil then @@ -391,18 +387,6 @@ describe('file_write', function() end) end) -describe('msgpack_file_write', function() - itp('can write the whole file at once', function() - local err, fp = file_open(filec, m.kFileCreateOnly, 384) - eq(0, err) - eq(true, fp.wr) - local wr = msgpack_file_write(fp, fcontents) - eq(0, wr) - eq(0, m.file_close(fp, false)) - eq(fcontents, io.open(filec):read('*a')) - end) -end) - describe('file_skip', function() itp('can skip 3 bytes', function() local err, fp = file_open(file1, 0, 384) -- cgit