From 35239e977f53c25016b57729cada612aa53e11d4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 Mar 2024 09:29:21 +0800 Subject: test: use matches(...) instead of ok(string.find(...)) (#28111) --- test/functional/ex_cmds/edit_spec.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/functional/ex_cmds/edit_spec.lua') diff --git a/test/functional/ex_cmds/edit_spec.lua b/test/functional/ex_cmds/edit_spec.lua index b927fa418a..9d4effd72e 100644 --- a/test/functional/ex_cmds/edit_spec.lua +++ b/test/functional/ex_cmds/edit_spec.lua @@ -1,6 +1,7 @@ local helpers = require('test.functional.helpers')(after_each) local eq, command, fn = helpers.eq, helpers.command, helpers.fn local ok = helpers.ok +local matches = helpers.matches local clear = helpers.clear local feed = helpers.feed @@ -14,7 +15,7 @@ describe(':edit', function() feed([[]]) local bufname_before = fn.bufname('%') local bufnr_before = fn.bufnr('%') - helpers.ok(nil ~= string.find(bufname_before, '^term://')) -- sanity + matches('^term://', bufname_before) -- sanity command('edit') -- cgit