aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-09-11 19:30:46 +0200
committerGitHub <noreply@github.com>2020-09-11 19:30:46 +0200
commit997147e4bbb6c427e0b811d9d02991976afa9785 (patch)
tree0af5cb8480394d08b0ed6b9754192497877cfe3f /test/helpers.lua
parent7ba28b1aedcb88ef5643b32dc4a6bf92ac090fed (diff)
parenta8f71676a199b6ffccedf7388d4104431144b158 (diff)
downloadrneovim-997147e4bbb6c427e0b811d9d02991976afa9785.tar.gz
rneovim-997147e4bbb6c427e0b811d9d02991976afa9785.tar.bz2
rneovim-997147e4bbb6c427e0b811d9d02991976afa9785.zip
Merge pull request #12889 from vigoux/bytetrack-open-line
Fix invalid events with `o` `<CR>` and `autoindent`
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 7817345617..2e0258afed 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -82,6 +82,17 @@ end
function module.ok(res, msg, logfile)
return dumplog(logfile, assert.is_true, res, msg)
end
+
+-- TODO(bfredl): this should "failure" not "error" (issue with dumplog() )
+local function epicfail(state, arguments, _)
+ state.failure_message = arguments[1]
+ return false
+end
+assert:register("assertion", "epicfail", epicfail)
+function module.fail(msg, logfile)
+ return dumplog(logfile, assert.epicfail, msg)
+end
+
function module.matches(pat, actual)
if nil ~= string.match(actual, pat) then
return true