test: use matches(...) instead of ok(string.find(...)) (#28111)

This commit is contained in:
zeertzjq
2024-03-30 09:29:21 +08:00
committed by GitHub
parent 19d63563e1
commit 35239e977f
8 changed files with 20 additions and 24 deletions

View File

@@ -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([[<C-\><C-N>]])
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')