diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-11 03:29:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 03:29:18 +0200 |
commit | f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc (patch) | |
tree | e5676f34610bafc482179f8c17f45314d2d33acb /test/helpers.lua | |
parent | 84bac9f507e3258c574cfc91ce64889a2e125d46 (diff) | |
parent | 777d34ec376ee8706a80d4f1f44fb83397753116 (diff) | |
download | rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.tar.gz rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.tar.bz2 rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.zip |
Merge #8247 'server: introduce --listen'
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index 7cce6d8c55..0b6a10a29a 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -16,6 +16,12 @@ end local function ok(res) return assert.is_true(res) end +local function matches(pat, actual) + if nil ~= string.match(actual, pat) then + return true + end + error(string.format('Pattern does not match.\nPattern:\n%s\nActual:\n%s', pat, actual)) +end -- initial_path: directory to recurse into -- re: include pattern (string) @@ -572,6 +578,7 @@ return { hasenv = hasenv, intchar2lua = intchar2lua, map = map, + matches = matches, mergedicts_copy = mergedicts_copy, neq = neq, ok = ok, |