diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-07-12 18:58:17 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2025-07-12 18:58:17 -0400 |
| commit | 815916b45005da04838ceee749cec875ddad0f1a (patch) | |
| tree | 89e63628e6ce5e694037397c4340af4fe7424819 /test/functional/lua/thread_spec.lua | |
| parent | f3a54e7ccfcfa2752eccd7585e2c4b94a4c8c433 (diff) | |
| download | rneovim-815916b45005da04838ceee749cec875ddad0f1a.tar.gz rneovim-815916b45005da04838ceee749cec875ddad0f1a.tar.bz2 rneovim-815916b45005da04838ceee749cec875ddad0f1a.zip | |
test: zig build thread_spec.lua failure after `vim.text.diff` rename
Problem:
Since renaming `vim.diff` to `vim.text.diff`, `thread_spec.lua` fails in
the zig build. Is `vim.text.diff` not available in the thread context?
Why does it only fail in the zig build?
FAILED ./test/functional/lua/thread_spec.lua @ 217: thread vim.* diff
./test/functional/lua/thread_spec.lua:229: Expected objects to be the same.
Passed in:
(nil)
Expected:
(table: 0x7f221d392218) {
[1] = 'notification'
E5113: Lua chunk:
[2] = 'result'
[3] = {
[1] = '@@ -1 +1 @@
-Hello
+Helli
' } }
stack traceback:
./test/functional/lua/thread_spec.lua:229: in function <./test/functional/lua/thread_spec.lua:217>
FAILED ./test/functional/lua/thread_spec.lua @ 372: threadpool vim.* work
./test/functional/lua/thread_spec.lua:384: Expected objects to be the same.
Passed in:
(table: 0x7f2225be2c30) {
[1] = 'notification'
[2] = 'result'
*[3] = {
*[1] = vim.NIL } }
Expected:
(table: 0x7f2225be25c0) {
[1] = 'notification'
[2] = 'result'
*[3] = {
*[1] = '@@ -1 +1 @@
-Hello
+Helli
' } }
stack traceback:
./test/functional/lua/thread_spec.lua:384: in function <./test/functional/lua/thread_spec.lua:372>
Solution:
Use `vim._diff` in the test, until a root cause is found.
Diffstat (limited to 'test/functional/lua/thread_spec.lua')
| -rw-r--r-- | test/functional/lua/thread_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/lua/thread_spec.lua b/test/functional/lua/thread_spec.lua index 8653377760..9ff6b839f2 100644 --- a/test/functional/lua/thread_spec.lua +++ b/test/functional/lua/thread_spec.lua @@ -217,7 +217,7 @@ describe('thread', function() it('diff', function() exec_lua [[ local entry = function(async) - async:send(vim.text.diff('Hello\n', 'Helli\n')) + async:send(vim._diff('Hello\n', 'Helli\n')) end local on_async = function(ret) vim.rpcnotify(1, 'result', ret) @@ -372,7 +372,7 @@ describe('threadpool', function() it('work', function() exec_lua [[ local work_fn = function() - return vim.text.diff('Hello\n', 'Helli\n') + return vim._diff('Hello\n', 'Helli\n') end local after_work_fn = function(ret) vim.rpcnotify(1, 'result', ret) |