diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 17:17:37 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 17:19:07 -0700 |
commit | 7e1c9598617a140e40a0a22676c0631294617246 (patch) | |
tree | e6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/provider/python3_spec.lua | |
parent | af946046b922dc5d5285a70a23d11916d8389a5d (diff) | |
download | rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.gz rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.bz2 rneovim-7e1c9598617a140e40a0a22676c0631294617246.zip |
test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
Diffstat (limited to 'test/functional/provider/python3_spec.lua')
-rw-r--r-- | test/functional/provider/python3_spec.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua index f4b1b0e4dc..d7ca0bd420 100644 --- a/test/functional/provider/python3_spec.lua +++ b/test/functional/provider/python3_spec.lua @@ -2,18 +2,19 @@ local helpers = require('test.functional.helpers')(after_each) local eval, command, feed = helpers.eval, helpers.command, helpers.feed local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert local expect, write_file = helpers.expect, helpers.write_file -local expect_err = helpers.expect_err local feed_command = helpers.feed_command local source = helpers.source local missing_provider = helpers.missing_provider +local matches = helpers.matches +local pcall_err = helpers.pcall_err do clear() if missing_provider('python3') then it(':python3 reports E319 if provider is missing', function() local expected = [[Vim%(py3.*%):E319: No "python3" provider found.*]] - expect_err(expected, command, 'py3 print("foo")') - expect_err(expected, command, 'py3file foo') + matches(expected, pcall_err(command, 'py3 print("foo")')) + matches(expected, pcall_err(command, 'py3file foo')) end) pending('Python 3 (or the pynvim module) is broken/missing', function() end) return |