From 743860de40502227b3f0ed64317eb937d24d4a36 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 4 Apr 2023 21:59:06 +0200 Subject: test: replace lfs with luv and vim.fs test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed. --- test/functional/vimscript/writefile_spec.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/functional/vimscript/writefile_spec.lua') diff --git a/test/functional/vimscript/writefile_spec.lua b/test/functional/vimscript/writefile_spec.lua index 8c8da9dc88..c816efd37b 100644 --- a/test/functional/vimscript/writefile_spec.lua +++ b/test/functional/vimscript/writefile_spec.lua @@ -1,6 +1,7 @@ local helpers = require('test.functional.helpers')(after_each) -local lfs = require('lfs') +local luv = require('luv') +local mkdir = helpers.mkdir local clear = helpers.clear local eq = helpers.eq local funcs = helpers.funcs @@ -19,16 +20,16 @@ local ddname_tail = '2' local ddname = dname .. '/' .. ddname_tail before_each(function() - lfs.mkdir(dname) - lfs.mkdir(ddname) + mkdir(dname) + mkdir(ddname) clear() end) after_each(function() os.remove(fname) os.remove(dfname) - lfs.rmdir(ddname) - lfs.rmdir(dname) + luv.fs_rmdir(ddname) + luv.fs_rmdir(dname) end) describe('writefile()', function() -- cgit From 75119fcc86e055895af824f7fdbba2f42c1cbbe8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 May 2023 07:02:43 +0800 Subject: vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539) https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Co-authored-by: Yegappan Lakshmanan --- test/functional/vimscript/writefile_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/vimscript/writefile_spec.lua') diff --git a/test/functional/vimscript/writefile_spec.lua b/test/functional/vimscript/writefile_spec.lua index c816efd37b..3cd1052968 100644 --- a/test/functional/vimscript/writefile_spec.lua +++ b/test/functional/vimscript/writefile_spec.lua @@ -147,11 +147,11 @@ describe('writefile()', function() for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do eq('Vim(call):E806: using Float as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('0.0')))) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('[]')))) - eq('Vim(call):E731: using Dictionary as a String', + eq('Vim(call):E731: Using a Dictionary as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('{}')))) - eq('Vim(call):E729: using Funcref as a String', + eq('Vim(call):E729: Using a Funcref as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('function("tr")')))) end eq('Vim(call):E5060: Unknown flag: «»', -- cgit From 88cfb49bee3c9102082c7010acb92244e4ad1348 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 May 2023 07:14:39 +0800 Subject: vim-patch:8.2.4890: inconsistent capitalization in error messages Problem: Inconsistent capitalization in error messages. Solution: Make capitalization consistent. (Doug Kearns) https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa Co-authored-by: Bram Moolenaar --- test/functional/vimscript/writefile_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/vimscript/writefile_spec.lua') diff --git a/test/functional/vimscript/writefile_spec.lua b/test/functional/vimscript/writefile_spec.lua index 3cd1052968..da06671fe5 100644 --- a/test/functional/vimscript/writefile_spec.lua +++ b/test/functional/vimscript/writefile_spec.lua @@ -145,7 +145,7 @@ describe('writefile()', function() pcall_err(command, ('call writefile(%s, "%s", "b")'):format(arg, fname))) end for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do - eq('Vim(call):E806: using Float as a String', + eq('Vim(call):E806: Using Float as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('0.0')))) eq('Vim(call):E730: Using a List as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('[]')))) -- cgit From bdaaf2e8e113f8c32c70f83b60e0bf3f648357c1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 May 2023 09:00:35 +0800 Subject: vim-patch:9.0.0250: slightly inconsistent error messages Problem: Slightly inconsistent error messages. Solution: Make it "Using a Float". (closes vim/vim#10959) https://github.com/vim/vim/commit/dde77a7c4d72622284dc5fb72557bde42c314fa6 Co-authored-by: Bram Moolenaar --- test/functional/vimscript/writefile_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/vimscript/writefile_spec.lua') diff --git a/test/functional/vimscript/writefile_spec.lua b/test/functional/vimscript/writefile_spec.lua index da06671fe5..521a4eb2b1 100644 --- a/test/functional/vimscript/writefile_spec.lua +++ b/test/functional/vimscript/writefile_spec.lua @@ -145,7 +145,7 @@ describe('writefile()', function() pcall_err(command, ('call writefile(%s, "%s", "b")'):format(arg, fname))) end for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do - eq('Vim(call):E806: Using Float as a String', + eq('Vim(call):E806: Using a Float as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('0.0')))) eq('Vim(call):E730: Using a List as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('[]')))) -- cgit From 7abfb1f86e25efcbe6ec31c8d3f196a60d718123 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 12 Jun 2023 12:48:14 +0800 Subject: vim-patch:8.2.2949: tests failing because no error for float to string conversion Problem: Tests failing because there is no error for float to string conversion. Solution: Change the check for failure to check for correct result. Make some conversions strict in Vim9 script. https://github.com/vim/vim/commit/3cfa5b16b06bcc034f6de77070fa779d698ab5e9 Co-authored-by: Bram Moolenaar --- test/functional/vimscript/writefile_spec.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'test/functional/vimscript/writefile_spec.lua') diff --git a/test/functional/vimscript/writefile_spec.lua b/test/functional/vimscript/writefile_spec.lua index 521a4eb2b1..88c19bd839 100644 --- a/test/functional/vimscript/writefile_spec.lua +++ b/test/functional/vimscript/writefile_spec.lua @@ -145,8 +145,6 @@ describe('writefile()', function() pcall_err(command, ('call writefile(%s, "%s", "b")'):format(arg, fname))) end for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do - eq('Vim(call):E806: Using a Float as a String', - pcall_err(command, ('call writefile(%s)'):format(args:format('0.0')))) eq('Vim(call):E730: Using a List as a String', pcall_err(command, ('call writefile(%s)'):format(args:format('[]')))) eq('Vim(call):E731: Using a Dictionary as a String', -- cgit