diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index 5acd2ea0bd..d59ce2a7c7 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -99,6 +99,9 @@ function module.matches(pat, actual) end error(string.format('Pattern does not match.\nPattern:\n%s\nActual:\n%s', pat, actual)) end +function module.contains(pat, actual) + return module.matches(".*" .. pat .. ".*", actual) +end --- Asserts that `pat` matches one or more lines in the tail of $NVIM_LOG_FILE. --- |