From 052498ed42780a76daea589d063cd8947a894673 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 20 Apr 2024 17:44:13 +0200 Subject: test: improve test conventions Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004. --- test/functional/legacy/substitute_spec.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'test/functional/legacy/substitute_spec.lua') diff --git a/test/functional/legacy/substitute_spec.lua b/test/functional/legacy/substitute_spec.lua index d540a7fdeb..647d62782c 100644 --- a/test/functional/legacy/substitute_spec.lua +++ b/test/functional/legacy/substitute_spec.lua @@ -2,12 +2,14 @@ -- Test for submatch() on substitute(). -- Test for *:s%* on :substitute. -local t = require('test.functional.testutil')() +local t = require('test.testutil') +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local feed, insert = t.feed, t.insert -local exec = t.exec -local clear, feed_command, expect = t.clear, t.feed_command, t.expect -local eq, eval = t.eq, t.eval + +local feed, insert = n.feed, n.insert +local exec = n.exec +local clear, feed_command, expect = n.clear, n.feed_command, n.expect +local eq, eval = t.eq, n.eval describe('substitute()', function() before_each(clear) -- cgit