aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/string_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-09-22 10:28:26 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-09-22 14:03:42 +0800
commit777dafdc4602a07cacaae59e57f9262423aa66fd (patch)
tree64ea6a7b2ee91359e869aba5ee31311e6211a0ee /test/functional/vimscript/string_spec.lua
parent4adfc4b7bcd1f4021e9b338273ee43822294ca43 (diff)
downloadrneovim-777dafdc4602a07cacaae59e57f9262423aa66fd.tar.gz
rneovim-777dafdc4602a07cacaae59e57f9262423aa66fd.tar.bz2
rneovim-777dafdc4602a07cacaae59e57f9262423aa66fd.zip
test: reduce some clear() calls
Use only a single clear() call in some test/functional/vimscript/ test files whose test cases have very little side effect. A downside of using a single clear() is that if a crash happens in one test case, all following test cases in the same file will also fail, but these functionalities and tests don't change very often.
Diffstat (limited to 'test/functional/vimscript/string_spec.lua')
-rw-r--r--test/functional/vimscript/string_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/vimscript/string_spec.lua b/test/functional/vimscript/string_spec.lua
index 4df9104e1e..3667bb71a7 100644
--- a/test/functional/vimscript/string_spec.lua
+++ b/test/functional/vimscript/string_spec.lua
@@ -13,7 +13,7 @@ local NIL = vim.NIL
local source = n.source
describe('string() function', function()
- before_each(clear)
+ setup(clear)
describe('used to represent floating-point values', function()
it('dumps NaN values', function()
@@ -103,7 +103,7 @@ describe('string() function', function()
end)
describe('used to represent funcrefs', function()
- before_each(function()
+ setup(function()
source([[
function Test1()
endfunction