diff options
author | Marcos Almeida <maurelio1234@users.noreply.github.com> | 2018-07-29 03:49:11 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-07-29 03:49:11 +0200 |
commit | a2253744c9bcd9229be9533540075e977f0be2cd (patch) | |
tree | 070c1e53b0578e99bcb0b8dcb2c56b5b7b821ba8 /test/helpers.lua | |
parent | befc7de26f2907fdf0c61b883c68c7a64432aa03 (diff) | |
download | rneovim-a2253744c9bcd9229be9533540075e977f0be2cd.tar.gz rneovim-a2253744c9bcd9229be9533540075e977f0be2cd.tar.bz2 rneovim-a2253744c9bcd9229be9533540075e977f0be2cd.zip |
system(): handle profiling and 'verbose' #8730
closes #8362
Vim's code calls `call_shell` directly from `get_system_output_as_rettv`
whereas in Nvim this function has been rewritten to not call `call_shell` but to call
`os_system` via `do_os_system`, losing the support for profiling and verbose.
Changing the code to call `call_shell` from `get_system_output_as_rettv`
seems to be too complicated to be worth it on the current version of the
code. So this commit duplicates the relevant code.
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index a774a67df3..66724f6a78 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -54,6 +54,9 @@ end local function ok(res) return assert.is_true(res) end +local function near(actual, expected, tolerance) + return assert.is.near(actual, expected, tolerance) +end local function matches(pat, actual) if nil ~= string.match(actual, pat) then return true @@ -694,6 +697,7 @@ local module = { map = map, matches = matches, mergedicts_copy = mergedicts_copy, + near = near, neq = neq, ok = ok, popen_r = popen_r, |