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.
This commit is contained in:
zeertzjq
2025-09-22 10:28:26 +08:00
parent 4adfc4b7bc
commit 777dafdc46
12 changed files with 22 additions and 23 deletions

View File

@@ -6,7 +6,7 @@ local eval = n.eval
local clear = n.clear
describe('Division operator', function()
before_each(clear)
setup(clear)
it('returns infinity on {positive}/0.0', function()
eq("str2float('inf')", eval('string(1.0/0.0)'))